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

Commit 25bcc733 authored by root's avatar root Committed by Gerrit Code Review
Browse files

Secure file moving issue fix

Change-Id: I684124bb32747a39d772b41c48d62c4c236b3ed2
parent b284ba6f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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$
                        }
                    }
                }
            }
        }