]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2014 13:52:00 +0000 (13:52 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2014 13:52:00 +0000 (13:52 +0000)
js/libs/gal/gal.filesystem.js
js/main.js

index c708d4cef5b6c0ec7a2de7422fbcc70a3fb30a55..42f72df9ef5e365ac34b42474d711096d3ca6192 100644 (file)
                        var file = basename_(key);
                        dir.getFile(file, {create: true}, function(fileEntry) {
                                var fileTransfer = new FileTransfer();
-                               fileTransfer.download(url, fileEntry.toURL(), function(entry) {
-                                       lookupTable[key] = entry.toURL();
+
+                               var u = fileEntry.toURL();
+                               if (PLATFORM == 'ios') {
+                                       u = fileEntry.fullPath;
+                               }
+
+                               fileTransfer.download(url, u, function(entry) {
+                                       var e = entry.toURL();
+                                       if (PLATFORM == 'ios') {
+                                               e = entry.fullPath;
+                                       }
+                                       lookupTable[key] = e;
                                        entry.setMetadata(function(entry) {
                                        }, failCallback, {'com.apple.MobileBackup': 1});
                                        callback();
index b0ccfa7d71b3ea1f99d580974cd9544f4ca0b707..f6b72191627f77af72380092e7b39f8ed1dcde80 100644 (file)
@@ -12,6 +12,7 @@ var home = window.location.toString();
 var resolution = 'auto';
 var OFFLINEAPP = false;
 var FINISHLOADING = false;
+var PLATFORM = 'web';
 
 try {
        $(function() {
@@ -59,10 +60,12 @@ try {
                        FINISHLOADING = true;
                }
 
+
                if (cordovaStorage) {
                        cordova = window.localStorage.getItem('cordova');
                }
 
+
                document.addEventListener('deviceready', onDeviceReady, false);
                document.addEventListener("resume", onAppResume, false);
 
@@ -104,6 +107,8 @@ try {
                var manifest = window.localStorage.getItem('manifest.' + DATAS.id);
                var fsprefix = window.sessionStorage.getItem('galfsprefix');
 
+               PLATFORM = DATAS.phonegap;
+
                if (DATAS.phonegap == 'ios') {
                        window.ExternalFileUtil = {
                                openWith: function(path, uti, success, fail, offset) {