|
@@ -499,7 +499,6 @@
|
|
|
if (result) return;
|
|
|
|
|
|
// File exists ?
|
|
|
-
|
|
|
tableLocalFile *localfile = [[NCManageDatabase sharedInstance] getTableLocalFileWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", metadata.fileID]];
|
|
|
|
|
|
if (localfile != nil && [[NSFileManager defaultManager] fileExistsAtPath:[NSString stringWithFormat:@"%@/%@", _directoryUser, metadata.fileID]]) {
|
|
@@ -674,10 +673,12 @@
|
|
|
// If fileID do not exists return.
|
|
|
if (!fileID) return;
|
|
|
|
|
|
- // Progress Task
|
|
|
- NSDictionary* userInfo = @{@"fileID": (fileID), @"serverUrl": (serverUrl), @"cryptated": ([NSNumber numberWithBool:NO]), @"progress": ([NSNumber numberWithFloat:0.0])};
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationName:@"NotificationProgressTask" object:nil userInfo:userInfo];
|
|
|
-
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ // Progress Task
|
|
|
+ NSDictionary* userInfo = @{@"fileID": (fileID), @"serverUrl": (serverUrl), @"cryptated": ([NSNumber numberWithBool:NO]), @"progress": ([NSNumber numberWithFloat:0.0])};
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"NotificationProgressTask" object:nil userInfo:userInfo];
|
|
|
+ });
|
|
|
+
|
|
|
if (errorCode != 0) {
|
|
|
|
|
|
if (errorCode != kCFURLErrorCancelled) {
|