Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7676605c authored by kai.cao's avatar kai.cao Committed by Gerrit Code Review
Browse files

[CMFileManager] Fix fail to move a folder

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
parent 93d66a33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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