cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgreb...@apache.org
Subject cordova-plugin-file-transfer git commit: CB-8816 Add cdvfile:// support on windows
Date Mon, 03 Aug 2015 13:32:36 GMT
Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 43eeef8e4 -> dcc98db15


CB-8816 Add cdvfile:// support on windows

github close #70


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

Branch: refs/heads/master
Commit: dcc98db15fdbca24cd48e3bb6e802f1066314703
Parents: 43eeef8
Author: biodiv <tom@eyesonic.net>
Authored: Mon Mar 16 16:33:59 2015 +0100
Committer: sgrebnov <v-segreb@microsoft.com>
Committed: Mon Aug 3 16:32:20 2015 +0300

----------------------------------------------------------------------
 src/windows/FileTransferProxy.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/dcc98db1/src/windows/FileTransferProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/FileTransferProxy.js b/src/windows/FileTransferProxy.js
index c056839..0c4e8b0 100644
--- a/src/windows/FileTransferProxy.js
+++ b/src/windows/FileTransferProxy.js
@@ -90,6 +90,9 @@ exec(win, fail, 'FileTransfer', 'upload',
             // Handle 'ms-appdata' scheme
             filePath = filePath.replace('ms-appdata:///local', appData.localFolder.path)
                                .replace('ms-appdata:///temp', appData.temporaryFolder.path);
+        } else if (filePath.indexOf('cdvfile://') === 0) {
+            filePath = filePath.replace('cdvfile://localhost/persistent', appData.localFolder.path)
+                               .replace('cdvfile://localhost/temporary', appData.temporaryFolder.path);
         }
         // normalize path separators
         filePath = cordovaPathToNative(filePath);
@@ -259,6 +262,9 @@ exec(win, fail, 'FileTransfer', 'upload',
             // Handle 'ms-appdata' scheme
             target = target.replace('ms-appdata:///local', appData.localFolder.path)
                            .replace('ms-appdata:///temp', appData.temporaryFolder.path);
+        } else if (target.indexOf('cdvfile://') === 0) {
+            target = target.replace('cdvfile://localhost/persistent', appData.localFolder.path)
+                           .replace('cdvfile://localhost/temporary', appData.temporaryFolder.path);
         }
         target = cordovaPathToNative(target);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message