浏览代码

fix copy DB on Documents

Marino Faggiana 7 年之前
父节点
当前提交
0623fe2284
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      iOSClient/AppDelegate.m

+ 1 - 5
iOSClient/AppDelegate.m

@@ -150,6 +150,7 @@
 #ifdef DEBUG
 #ifdef DEBUG
     NSString *atPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [[dirGroup URLByAppendingPathComponent:appDatabaseNextcloud] path]];
     NSString *atPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [[dirGroup URLByAppendingPathComponent:appDatabaseNextcloud] path]];
     NSString *toPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [CCUtility getDirectoryLocal]];
     NSString *toPathDB = [NSString stringWithFormat:@"%@/nextcloud.realm", [CCUtility getDirectoryLocal]];
+    [[NSFileManager defaultManager] removeItemAtPath:toPathDB error:nil];
     [[NSFileManager defaultManager] copyItemAtPath:atPathDB toPath:toPathDB error:nil];
     [[NSFileManager defaultManager] copyItemAtPath:atPathDB toPath:toPathDB error:nil];
 #endif
 #endif
     
     
@@ -1645,11 +1646,6 @@
         [[NCManageDatabase sharedInstance] setClearAllDateReadDirectory];
         [[NCManageDatabase sharedInstance] setClearAllDateReadDirectory];
     }
     }
     
     
-    if (([actualVersion compare:@"2.20.6" options:NSNumericSearch] == NSOrderedAscending)) {
-
-        [[NCManageDatabase sharedInstance] clearTable:[tableDirectory class] account:nil];
-    }
-    
     return YES;
     return YES;
 }
 }