Browse Source

clear code

Marino Faggiana 7 years ago
parent
commit
3ba8cecbd1
1 changed files with 7 additions and 2 deletions
  1. 7 2
      iOSClient/AppDelegate.m

+ 7 - 2
iOSClient/AppDelegate.m

@@ -104,7 +104,7 @@
     NSURL *dirGroup = [CCUtility getDirectoryGroup];
     NSURL *dirGroup = [CCUtility getDirectoryGroup];
     
     
     NSLog(@"[LOG] Start program group -----------------");
     NSLog(@"[LOG] Start program group -----------------");
-    NSLog(@"%@", dirGroup);    
+    NSLog(@"%@", [dirGroup path]);    
     NSLog(@"[LOG] Start program application -----------");
     NSLog(@"[LOG] Start program application -----------");
     NSLog(@"%@", [[CCUtility getDirectoryDocuments] stringByDeletingLastPathComponent]);
     NSLog(@"%@", [[CCUtility getDirectoryDocuments] stringByDeletingLastPathComponent]);
     NSLog(@"[LOG] -------------------------------------");
     NSLog(@"[LOG] -------------------------------------");
@@ -122,8 +122,13 @@
     // create Directory database Nextcloud
     // create Directory database Nextcloud
     dir = [[dirGroup URLByAppendingPathComponent:appDatabaseNextcloud] path];
     dir = [[dirGroup URLByAppendingPathComponent:appDatabaseNextcloud] path];
     if (![[NSFileManager defaultManager] fileExistsAtPath:dir])
     if (![[NSFileManager defaultManager] fileExistsAtPath:dir])
-    [[NSFileManager defaultManager] createDirectoryAtPath:dir withIntermediateDirectories:YES attributes:nil error:nil];
+        [[NSFileManager defaultManager] createDirectoryAtPath:dir withIntermediateDirectories:YES attributes:nil error:nil];
 
 
+    // create directory Provider Storage
+    dir = [CCUtility getDirectoryProviderStorage];
+    if (![[NSFileManager defaultManager] fileExistsAtPath: dir] && [dir length])
+        [[NSFileManager defaultManager] createDirectoryAtPath:dir withIntermediateDirectories:YES attributes:nil error:nil];
+    
     NSError *error = nil;
     NSError *error = nil;
     [[NSFileManager defaultManager] setAttributes:@{NSFileProtectionKey:NSFileProtectionNone} ofItemAtPath:dir error:&error];
     [[NSFileManager defaultManager] setAttributes:@{NSFileProtectionKey:NSFileProtectionNone} ofItemAtPath:dir error:&error];