فهرست منبع

Merge pull request #9475 from nextcloud/renameFix

Rename remote path upon renaming
Álvaro Brey 3 سال پیش
والد
کامیت
840ec88f57
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      src/main/java/com/owncloud/android/operations/RenameFileOperation.java

+ 6 - 2
src/main/java/com/owncloud/android/operations/RenameFileOperation.java

@@ -103,7 +103,7 @@ public class RenameFileOperation extends SyncOperation {
                     //saveLocalDirectory();
 
                 } else {
-                    saveLocalFile();
+                    saveLocalFile(newRemotePath);
                 }
             }
 
@@ -116,9 +116,13 @@ public class RenameFileOperation extends SyncOperation {
         return result;
     }
 
-    private void saveLocalFile() {
+    private void saveLocalFile(String newRemotePath) {
         file.setFileName(newName);
 
+        if (!file.isEncrypted()) {
+            file.setDecryptedRemotePath(newRemotePath);
+        }
+
         // try to rename the local copy of the file
         if (file.isDown()) {
             String oldPath = file.getStoragePath();