diff options
| author | root <srinivas.p031@gmail.com> | 2015-10-07 21:04:10 +0530 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-10-15 16:12:31 -0700 |
| commit | 25bcc733b630c3ee032b185ab9adfbbd99e4cbbc (patch) | |
| tree | b3e10816f73829db196e7a53b0df1e6b14da814d /src | |
| parent | b284ba6fc48b1e8d152a14b8ecd98a3f263c96e2 (diff) | |
Secure file moving issue fix
Change-Id: I684124bb32747a39d772b41c48d62c4c236b3ed2
Diffstat (limited to 'src')
| -rwxr-xr-x[-rw-r--r--] | src/com/cyanogenmod/filemanager/commands/secure/MoveCommand.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/secure/MoveCommand.java b/src/com/cyanogenmod/filemanager/commands/secure/MoveCommand.java index 0a7e09a..0ee0a7e 100644..100755 --- a/src/com/cyanogenmod/filemanager/commands/secure/MoveCommand.java +++ b/src/com/cyanogenmod/filemanager/commands/secure/MoveCommand.java @@ -113,6 +113,13 @@ public class MoveCommand extends Program implements MoveExecutable { if (!d.exists()) { throw new ExecutionException("Failed to rename file or directory", ex); } + if (s.exists() && d.exists()) { + if (!FileHelper.deleteFileOrFolder(s)) { + if (isTrace()) { + Log.v(TAG, "File copied successfully but not deleted"); //$NON-NLS-1$ + } + } + } } } |
