Update lib/windows8/plugin/windows8/file.js

Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/1ffb6fd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/1ffb6fd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/1ffb6fd5

Branch: refs/heads/master
Commit: 1ffb6fd51cf3b1644e7878a221a4dcf0f53b2769
Parents: 2e3b4c0
Author: wangmingfeng <mingfengwan...@gmail.com>
Authored: Tue Sep 25 09:33:57 2012 +0800
Committer: wangmingfeng <mingfengwan...@gmail.com>
Committed: Tue Sep 25 09:33:57 2012 +0800

----------------------------------------------------------------------
 lib/windows8/plugin/windows8/file.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/1ffb6fd5/lib/windows8/plugin/windows8/file.js
----------------------------------------------------------------------
diff --git a/lib/windows8/plugin/windows8/file.js 
b/lib/windows8/plugin/windows8/file.js
index a88482f..1500a77 100644
--- a/lib/windows8/plugin/windows8/file.js
+++ b/lib/windows8/plugin/windows8/file.js
@@ -70,10 +70,10 @@ module.exports = { //Merges with common
         var storageFolderPer = 
Windows.Storage.ApplicationData.current.localFolder;
         var storageFolderTem = 
Windows.Storage.ApplicationData.current.temporaryFolder;
 
-        if (fullPath == FileSystemPersistentRoot) {
+        if (fullPath == storageFolderPer.path) {
             win(new DirectoryEntry(storageFolderPer.name, 
storageFolderPer.path));
             return;
-        } else if (fullPath == FileSystemTemproraryRoot) {
+        } else if (fullPath == storageFolderTem.path) {
             win(new DirectoryEntry(storageFolderTem.name, 
storageFolderTem.path));
             return;
         }
@@ -692,11 +692,11 @@ module.exports = { //Merges with common
 
         switch (type) {
             case LocalFileSystem.TEMPORARY:
-                filePath = FileSystemTemproraryRoot;
+                filePath = 
Windows.Storage.ApplicationData.current.temporaryFolder.path;
                 fsTypeName = "temporary";
                 break;
             case LocalFileSystem.PERSISTENT:
-                filePath = FileSystemPersistentRoot;
+                filePath = 
Windows.Storage.ApplicationData.current.localFolder.path;
                 fsTypeName = "persistent";
                 break;
         }
@@ -730,7 +730,7 @@ module.exports = { //Merges with common
 
         // support for special path start with file:///
         if (path.substr(0, 8) == "file:///") {
-            path = FileSystemPersistentRoot + "\\" + 
String(path).substr(8).split("/").join("\\");
+            path = Windows.Storage.ApplicationData.current.localFolder.path + 
"\\" + String(path).substr(8).split("/").join("\\");
             Windows.Storage.StorageFile.getFileFromPathAsync(path).then(
                 function (storageFile) {
                     success(new FileEntry(storageFile.name, storageFile.path));

Reply via email to