Forráskód Böngészése

1.任务开始和暂停不允许改路径 除非路径存在了

huangxiaodong 1 éve%!(EXTRA string=óta)
szülő
commit
7e1f92774e

+ 37 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/backupsSetViewController.m

@@ -214,9 +214,43 @@
     }
     else if(model.curBackupsState == backupsStateUploading
           || model.curBackupsState == backupsStateSuspend
-       ){
-        [[iToast makeText:NSLocalizedString(@"File_backups_set_default_path_tip",nil)] show];
-    }
+       )
+        {
+         
+         //判断尺寸路径是否存在
+         
+         NSString * uploadDefaultPath = [HWDataManager getStringWithKey:Const_photo_backups_default_path];
+         
+         BOOL isExtraFileType = NO;
+         BOOL isExtraPathFind = NO;
+         if(uploadDefaultPath){
+             if(![uploadDefaultPath containsString:@"sdcard/"]){
+                 isExtraFileType = YES;
+             }
+         }
+         
+         if(uploadDefaultPath && ksharedAppDelegate.cloudPhoneExtraFileListMod){
+             NSArray*arr =  ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+             
+             for (cloudPhoneExtraFileModel*model in arr) {
+                 if([uploadDefaultPath containsString:model.extraPath]){
+                     
+                     isExtraPathFind = YES;
+                     break;
+                 }
+             }
+             
+             
+         }
+         
+         if(isExtraFileType && !isExtraPathFind){
+             [self gotofileTransferPathCheckVCFun];
+         }
+         else{
+             [[iToast makeText:NSLocalizedString(@"File_backups_set_default_path_tip",nil)] show];
+         }
+         
+     }
     else{
         [self gotofileTransferPathCheckVCFun];
     }

+ 32 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/fileTransfeSetViewController.m

@@ -206,7 +206,38 @@
         ||model.curUploadStateType == uploadStateSuspend
        ){
         
-        [[iToast makeText:NSLocalizedString(@"File_upload_set_default_path_tip",nil)] show];
+        //判断尺寸路径是否存在
+        
+        NSString * uploadDefaultPath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+        
+        BOOL isExtraFileType = NO;
+        BOOL isExtraPathFind = NO;
+        if(uploadDefaultPath){
+            if(![uploadDefaultPath containsString:@"sdcard/"]){
+                isExtraFileType = YES;
+            }
+        }
+        
+        if(uploadDefaultPath && ksharedAppDelegate.cloudPhoneExtraFileListMod){
+            NSArray*arr =  ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+            
+            for (cloudPhoneExtraFileModel*model in arr) {
+                if([uploadDefaultPath containsString:model.extraPath]){
+                    isExtraPathFind = YES;
+                    break;
+                }
+            }
+            
+            
+        }
+        
+        if(isExtraFileType && !isExtraPathFind){
+            [self gotofileTransferPathCheckVCFun];
+        }
+        else{
+            [[iToast makeText:NSLocalizedString(@"File_upload_set_default_path_tip",nil)] show];
+        }
+        
     }
     else{
         [self gotofileTransferPathCheckVCFun];