diff options
| author | Jorge Ruesga <jorge@ruesga.com> | 2012-11-05 23:47:21 +0100 |
|---|---|---|
| committer | Jorge Ruesga <jorge@ruesga.com> | 2012-11-05 23:47:21 +0100 |
| commit | b1d5cd1b4e1dc605032072e91a0a8c76515ec030 (patch) | |
| tree | 5c228cf8f4b8c42cfe762784fd14992a45b90863 /src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java | |
| parent | 9fe2cd7b099aaa8cf2c5eb5941af1f49797958eb (diff) | |
CMFileManager: Fix mv operation on Cross-device link failure
Issue https://github.com/jruesga/CMFileManager/issues/31.
The busybox mv command returns a failure when files are moved between filesystem (Cross-device
link failure). This changes fix this failure by:
* Replace mv command for a "mv or cp+rm" operation.
* rm operation occurs over source mount point so this need to be mounted prior to execute this
new command.
* Fix the stderr buffer filling on error.
Change-Id: If113ad810e7daffeb8379589789b2855eda14908
Diffstat (limited to 'src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java')
| -rw-r--r-- | src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java b/src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java index fa9b5bf..ab9901f 100644 --- a/src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java +++ b/src/com/cyanogenmod/filemanager/commands/java/CreateFileCommand.java @@ -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); } } |
