Marino Faggiana пре 7 година
родитељ
комит
3d42882a33
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      iOSClient/AutoUpload/NCAutoUpload.m

+ 2 - 3
iOSClient/AutoUpload/NCAutoUpload.m

@@ -335,7 +335,6 @@
          return;
          return;
     
     
     tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
     tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
-    BOOL useSubFolder = tableAccount.autoUploadCreateSubfolder;
     NSMutableArray *metadataNetFull = [NSMutableArray new];
     NSMutableArray *metadataNetFull = [NSMutableArray new];
     NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:app.activeUrl];
     NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:app.activeUrl];
 
 
@@ -363,7 +362,7 @@
     });
     });
     
     
     // Create the folder for Photos & if request the subfolders
     // Create the folder for Photos & if request the subfolders
-    if(![[NCAutoUpload sharedInstance] createFolderSubFolderAutoUploadFolderPhotos:autoUploadPath useSubFolder:useSubFolder assets:newAssetToUpload selector:selectorUploadAutoUploadAll]) {
+    if(![[NCAutoUpload sharedInstance] createFolderSubFolderAutoUploadFolderPhotos:autoUploadPath useSubFolder:tableAccount.autoUploadCreateSubfolder assets:newAssetToUpload selector:selectorUploadAutoUploadAll]) {
         dispatch_async(dispatch_get_main_queue(), ^{
         dispatch_async(dispatch_get_main_queue(), ^{
             // end loading
             // end loading
             [_hud hideHud];
             [_hud hideHud];
@@ -394,7 +393,7 @@
         [formatter setDateFormat:@"MM"];
         [formatter setDateFormat:@"MM"];
         NSString *monthString = [formatter stringFromDate:assetDate];
         NSString *monthString = [formatter stringFromDate:assetDate];
         
         
-        if (useSubFolder)
+        if (tableAccount.autoUploadCreateSubfolder)
             serverUrl = [NSString stringWithFormat:@"%@/%@/%@", autoUploadPath, yearString, monthString];
             serverUrl = [NSString stringWithFormat:@"%@/%@/%@", autoUploadPath, yearString, monthString];
         else
         else
             serverUrl = autoUploadPath;
             serverUrl = autoUploadPath;