|
@@ -3838,19 +3838,22 @@
|
|
NSData *dataFileID = [dic objectForKey: k_metadataKeyedUnarchiver];
|
|
NSData *dataFileID = [dic objectForKey: k_metadataKeyedUnarchiver];
|
|
NSString *fileID = [NSKeyedUnarchiver unarchiveObjectWithData:dataFileID];
|
|
NSString *fileID = [NSKeyedUnarchiver unarchiveObjectWithData:dataFileID];
|
|
|
|
|
|
- tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
|
|
|
|
|
|
+ if (fileID) {
|
|
|
|
+
|
|
|
|
+ tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
|
|
|
|
|
|
- if (metadata) {
|
|
|
|
|
|
+ if (metadata) {
|
|
|
|
|
|
- tableAccount *account = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account = %@", metadata.account]];
|
|
|
|
|
|
+ tableAccount *account = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account = %@", metadata.account]];
|
|
|
|
|
|
- if (account) {
|
|
|
|
|
|
+ if (account) {
|
|
|
|
|
|
- NSString *directoryUser = [CCUtility getDirectoryActiveUser:account.user activeUrl:account.url];
|
|
|
|
|
|
+ NSString *directoryUser = [CCUtility getDirectoryActiveUser:account.user activeUrl:account.url];
|
|
|
|
|
|
- if (directoryUser)
|
|
|
|
- if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", directoryUser, fileID]])
|
|
|
|
- return YES;
|
|
|
|
|
|
+ if (directoryUser)
|
|
|
|
+ if ([[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", directoryUser, fileID]])
|
|
|
|
+ return YES;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|