OSDN Git Service

[CMFileManager] Fix fail to move a folder
authorkai.cao <kai.cao@ck-telecom.com>
Mon, 7 Sep 2015 07:12:24 +0000 (15:12 +0800)
committerGerrit Code Review <gerrit@cyanogenmod.org>
Wed, 16 Sep 2015 20:47:58 +0000 (13:47 -0700)
Fix fail to move a folder to another folder when the one folder name contains the another folder name.

[Reproduce]
1. Create a folder named such as aaa
2. Create another folder named such as aaab
3. Copy or Move the folder aaa to folder aaab

The Operation Fail

Change-Id: I27996f9b9530001fe01eddf80a0cac7a8531c163

src/com/cyanogenmod/filemanager/ui/policy/CopyMoveActionPolicy.java

index 73d08ee..f893635 100755 (executable)
@@ -558,7 +558,7 @@ public final class CopyMoveActionPolicy extends ActionsPolicy {
         int cc = files.size();
         for (int i = 0; i < cc; i++) {
             LinkedResource linkRes = files.get(i);
-            String src = linkRes.mSrc.getAbsolutePath();
+            String src = FileHelper.addTrailingSlash(linkRes.mSrc.getAbsolutePath());
             String dst = linkRes.mDst.getAbsolutePath();
 
             // 1.- Current directory can't be moved