marinofaggiana 4 vuotta sitten
vanhempi
commit
7e087c41cf
3 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 1 1
      Cartfile
  2. 1 1
      Cartfile.resolved
  3. 5 5
      iOSClient/Trash/NCTrash.swift

+ 1 - 1
Cartfile

@@ -4,7 +4,7 @@ github "kishikawakatsumi/UICKeyChainStore" "v2.1.2"
 github "MortimerGoro/MGSwipeTableCell" "1.6.8"
 github "dzenbot/DZNEmptyDataSet" "v1.8.1"
 github "jdg/MBProgressHUD" "1.1.0"
-github "realm/realm-cocoa" 
+github "realm/realm-cocoa" "v5.2.0"
 github "SVGKit/SVGKit" "3.x"
 github "WeTransfer/WeScan" "1.2.0"
 github "malcommac/SwiftRichString"

+ 1 - 1
Cartfile.resolved

@@ -19,7 +19,7 @@ github "malcommac/SwiftRichString" "3.7.2"
 github "marinofaggiana/KTVHTTPCache" "2.0.2"
 github "marinofaggiana/TOPasscodeViewController" "0.0.7"
 github "marinofaggiana/XLForm" "eb9381ad8129f60402bf412250fb31b95a628a08"
-github "nextcloud/ios-communication-library" "db8abee83a68ecf8b69430682a45f8038138b9a9"
+github "nextcloud/ios-communication-library" "252237149f9476a80155f33c322d7232caa3d0dc"
 github "realm/realm-cocoa" "v5.2.0"
 github "rechsteiner/Parchment" "v1.7.0"
 github "scenee/FloatingPanel" "v1.7.5"

+ 5 - 5
iOSClient/Trash/NCTrash.swift

@@ -99,8 +99,8 @@ class NCTrash: UIViewController, UIGestureRecognizerDelegate, NCTrashListCellDel
         // Datasource & serverUrl
         
         if path == "" {
-            let userID = (appDelegate.activeUserID as NSString).addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlFragmentAllowed)
-            path = "/trashbin/" + userID! + "/trash/"
+            guard let userID = (appDelegate.activeUserID as NSString).addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlFragmentAllowed) else { return }
+            path = appDelegate.activeUrl + "/remote.php/dav/trashbin/" + userID + "/trash/"
         }
         
         if (datasource.count == 0) {
@@ -690,8 +690,8 @@ extension NCTrash {
             return
         }
         
-        let fileNameFrom = appDelegate.activeUrl + tableTrash.filePath + tableTrash.fileName
-        let fileNameTo = appDelegate.activeUrl + k_dav + "/trashbin/" + appDelegate.activeUserID + "/restore/" + tableTrash.fileName
+        let fileNameFrom = tableTrash.filePath + tableTrash.fileName
+        let fileNameTo = appDelegate.activeUrl + "/remote.php/dav/trashbin/" + appDelegate.activeUserID + "/restore/" + tableTrash.fileName
         
         NCCommunication.shared.moveFileOrFolder(serverUrlFileNameSource: fileNameFrom, serverUrlFileNameDestination: fileNameTo, overwrite: true) { (account, errorCode, errorDescription) in
             if errorCode == 0 && account == self.appDelegate.activeAccount {
@@ -727,7 +727,7 @@ extension NCTrash {
             return
         }
         
-        let serverUrlFileName = appDelegate.activeUrl + tableTrash.filePath + tableTrash.fileName
+        let serverUrlFileName = tableTrash.filePath + tableTrash.fileName
         
         NCCommunication.shared.deleteFileOrFolder(serverUrlFileName) { (account, errorCode, errorDescription) in
             if errorCode == 0 && account == self.appDelegate.activeAccount {