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

Commit 3ae1d1d9 authored by David van Tonder's avatar David van Tonder Committed by Gerrit Code Review
Browse files

Merge "CMFileManager: Fix mv operation on Cross-device link failure" into jellybean

parents e4dd07c8 b1d5cd1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@
  <command commandId="cp" commandPath="/system/xbin/cp" commandArgs="-af %1$s %2$s" />
  <command commandId="link" commandPath="/system/bin/ln" commandArgs="-s %1$s %2$s" />
  <command commandId="mkdir" commandPath="/system/bin/mkdir" commandArgs="-p %1$s" />
  <command commandId="mv" commandPath="/system/bin/mv" commandArgs="%1$s %2$s" />
  <command commandId="mv" commandPath="/system/bin/mv" commandArgs="%1$s %2$s || ( /system/xbin/cp -af %1$s %2$s &amp;&amp; /system/bin/rm -R %1$s )" />
  <command commandId="rm" commandPath="/system/bin/rm" commandArgs="%1$s" />
  <command commandId="rmdir" commandPath="/system/bin/rm" commandArgs="-R %1$s" />

+10 −3
Original line number Diff line number Diff line
@@ -25,9 +25,16 @@ import com.cyanogenmod.filemanager.model.MountPoint;
public interface WritableExecutable extends SyncResultExecutable {

    /**
     * Method that return the mount point that the program use to write.
     * Method that return the source mount point that the program use to write.
     *
     * @return MountPoint The mount point reference.
     * @return MountPoint The source mount point reference.
     */
    MountPoint getWritableMountPoint();
    MountPoint getSrcWritableMountPoint();

    /**
     * Method that return the destination mount point that the program use to write.
     *
     * @return MountPoint The destination mount point reference.
     */
    MountPoint getDstWritableMountPoint();
}
+9 −1
Original line number Diff line number Diff line
@@ -100,7 +100,15 @@ public class CopyCommand extends Program implements CopyExecutable {
     * {@inheritDoc}
     */
    @Override
    public MountPoint getWritableMountPoint() {
    public MountPoint getSrcWritableMountPoint() {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public MountPoint getDstWritableMountPoint() {
        return MountPointHelper.getMountPointFromDirectory(this.mDst);
    }

+9 −1
Original line number Diff line number Diff line
@@ -95,7 +95,15 @@ public class CreateDirCommand extends Program implements CreateDirExecutable {
     * {@inheritDoc}
     */
    @Override
    public MountPoint getWritableMountPoint() {
    public MountPoint getSrcWritableMountPoint() {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public MountPoint getDstWritableMountPoint() {
        return MountPointHelper.getMountPointFromDirectory(this.mPath);
    }
}
+9 −1
Original line number Diff line number Diff line
@@ -105,7 +105,15 @@ public class CreateFileCommand extends Program implements CreateFileExecutable {
     * {@inheritDoc}
     */
    @Override
    public MountPoint getWritableMountPoint() {
    public MountPoint getSrcWritableMountPoint() {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public MountPoint getDstWritableMountPoint() {
        return MountPointHelper.getMountPointFromDirectory(this.mPath);
    }
}
Loading