From bd454f4f2f693e30b0468cf92f6e47da73b6e0ec Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 9 Mar 2012 15:47:35 -0800 Subject: Fixing Issues for Windows Lib --- js/io/system/ninjalibrary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/io/system/ninjalibrary.js') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index 960bdef9..ff949613 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -116,7 +116,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { dir = folder.name; } // - if (!this.coreApi.createDirectory({uri: dir})) { + if (!this.coreApi.createDirectory({uri: dir.replace(/\/\//gi, '/')})) { //Error occured while creating folders return; } @@ -132,7 +132,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { this.chromeApi.fileContent(contents[i].fullPath, function (result) { // //this.coreApi.createFile({uri: fileRoot+result.file.fullPath, contents: blob.getBlob(result.data.type), contentType: result.data.type}); - this.coreApi.createFile({uri: fileRoot+result.file.fullPath, contents: result.content}); + this.coreApi.createFile({uri: (fileRoot+result.file.fullPath).replace(/\/\//gi, '/'), contents: result.content}); }.bind(this)); } } -- cgit v1.2.3 From 615be47750fb86c07acd9354da12a76abe6c24e0 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 10 Mar 2012 16:27:48 -0800 Subject: Temp Runtime WebGL Fix Added a temporary fix to allow for webGL runtime functionality. Copying the desired folder name into a static name. There is a lag in doing this, so obviously now ideal. Need to discuss adding dynamic path-ing during author and runtime. --- js/io/system/ninjalibrary.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/io/system/ninjalibrary.js') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index ff949613..201598fc 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -82,7 +82,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { // copyLibToCloud: { enumerable: false, - value: function (path, libName) { + value: function (path, libName, callback) { // if(this.coreApi.directoryExists({uri: path+libName}).status === 404) { this.chromeApi.directoryContents(this.chromeApi.fileSystem.root, function (contents) { @@ -91,7 +91,7 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { //Getting contents of library to be copied this.chromeApi.directoryContents(contents[i], function (lib) { //Creating directory structure from subfolders - this.copyDirectoryToCloud(path, contents[i], path, function (status) {console.log(status)}); + this.copyDirectoryToCloud(path, contents[i], path, callback); }.bind(this)); break; } @@ -138,6 +138,8 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { } }.bind(this)); } + //TODO Add logic for proper callback status(es) + if (callback) callback(true); } }, //////////////////////////////////////////////////////////////////// -- cgit v1.2.3