瀏覽代碼

directory cryptated

Marino Faggiana 8 年之前
父節點
當前提交
7f0dec62ec
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      Picker/DocumentPickerViewController.swift

+ 7 - 3
Picker/DocumentPickerViewController.swift

@@ -316,14 +316,18 @@ extension DocumentPickerViewController: UITableViewDataSource {
     func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
         
         let recordTableMetadata = recordsTableMetadata?[(indexPath as NSIndexPath).row]
-        
+        var dir : String? = recordTableMetadata?.fileName
+
         let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "DocumentPickerViewController") as! DocumentPickerViewController
         
-        nextViewController.localServerUrl = CCUtility.stringAppendServerUrl(localServerUrl!, addServerUrl: recordTableMetadata!.fileName)
+        if recordTableMetadata?.cryptated == 1 {
+            dir = CCUtility.trasformedFileNamePlist(inCrypto: recordTableMetadata!.fileName)
+        }
+        
+        nextViewController.localServerUrl = CCUtility.stringAppendServerUrl(localServerUrl!, addServerUrl: dir)
         nextViewController.titleFolder = recordTableMetadata?.fileNamePrint
         
         self.navigationController?.pushViewController(nextViewController, animated: true)
-        
     }
 }