cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject git commit: CB-6080: Fix file copy when src and dst are on different local file systems
Date Thu, 20 Feb 2014 16:37:35 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/dev ea236b554 -> 1b4a30696


CB-6080: Fix file copy when src and dst are on different local file systems


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/1b4a3069
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/1b4a3069
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/1b4a3069

Branch: refs/heads/dev
Commit: 1b4a30696ece23036aa30af7d7d2c8c43ed41b62
Parents: ea236b5
Author: Ian Clelland <iclelland@chromium.org>
Authored: Thu Feb 20 11:37:18 2014 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Thu Feb 20 11:37:18 2014 -0500

----------------------------------------------------------------------
 RELEASENOTES.md                  | 1 +
 src/android/LocalFilesystem.java | 2 +-
 src/ios/CDVLocalFilesystem.m     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1b4a3069/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 7eb23bd..4e869fe 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -133,3 +133,4 @@
 * CB-2432, CB-3185, CB-5975: Fix Android handling of content:// URLs
 * CB-6050: Public method for returning a FileEntry from a device file path
 * CB-6057: Add methods for plugins to convert between URLs and paths
+* CB-6080: Fix file copy when src and dst are on different local file systems

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1b4a3069/src/android/LocalFilesystem.java
----------------------------------------------------------------------
diff --git a/src/android/LocalFilesystem.java b/src/android/LocalFilesystem.java
index bc17772..7260000 100644
--- a/src/android/LocalFilesystem.java
+++ b/src/android/LocalFilesystem.java
@@ -480,7 +480,7 @@ public class LocalFilesystem extends Filesystem {
             // Figure out where we should be copying to
             final LocalFilesystemURL destinationURL = makeDestinationURL(newName, srcURL,
destURL);
 
-	        String srcFilesystemPath = this.filesystemPathForURL(srcURL);
+	        String srcFilesystemPath = srcFs.filesystemPathForURL(srcURL);
             File sourceFile = new File(srcFilesystemPath);
             String destFilesystemPath = this.filesystemPathForURL(destinationURL);
             File destinationFile = new File(destFilesystemPath);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/1b4a3069/src/ios/CDVLocalFilesystem.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVLocalFilesystem.m b/src/ios/CDVLocalFilesystem.m
index dd7534c..00114b9 100644
--- a/src/ios/CDVLocalFilesystem.m
+++ b/src/ios/CDVLocalFilesystem.m
@@ -537,7 +537,7 @@
 
     else if ([srcFs isKindOfClass:[CDVLocalFilesystem class]]) {
         /* Same FS, we can shortcut with NSFileManager operations */
-        NSString *srcFullPath = [self filesystemPathForURL:srcURL];
+        NSString *srcFullPath = [srcFs filesystemPathForURL:srcURL];
 
         BOOL bSrcIsDir = NO;
         BOOL bSrcExists = [fileMgr fileExistsAtPath:srcFullPath isDirectory:&bSrcIsDir];


Mime
View raw message