|
@@ -363,13 +363,16 @@
|
|
|
tableMetadata *metadata;
|
|
|
tableShare *table = [_dataSource objectAtIndex:indexPath.row];
|
|
|
|
|
|
- NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:table.serverUrl];
|
|
|
- if (directoryID.length > 0)
|
|
|
- metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND directoryID = %@ AND fileName = %@", appDelegate.activeAccount, directoryID, table.fileName]];
|
|
|
+ if (table.serverUrl) {
|
|
|
+
|
|
|
+ NSString *directoryID = [[NCManageDatabase sharedInstance] getDirectoryID:table.serverUrl];
|
|
|
+ if (directoryID.length > 0)
|
|
|
+ metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND directoryID = %@ AND fileName = %@", appDelegate.activeAccount, directoryID, table.fileName]];
|
|
|
|
|
|
- if (metadata) {
|
|
|
+ if (metadata) {
|
|
|
|
|
|
- [appDelegate.activeMain openWindowShare:metadata];
|
|
|
+ [appDelegate.activeMain openWindowShare:metadata];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|