CB-8816 Add cdvfile:// support on windows

github close #70
This commit is contained in:
biodiv
2015-03-16 16:33:59 +01:00
committed by sgrebnov
parent 43eeef8e44
commit dcc98db15f

View File

@@ -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);