From 6ca89e7233614b93c49a4feadb8a0a82e5800b8f Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sun, 27 May 2012 17:32:41 -0700 Subject: Cleaning up --- js/io/system/ninjalibrary.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js/io/system') diff --git a/js/io/system/ninjalibrary.js b/js/io/system/ninjalibrary.js index dab623c1..12af5988 100644 --- a/js/io/system/ninjalibrary.js +++ b/js/io/system/ninjalibrary.js @@ -65,8 +65,13 @@ exports.NinjaLibrary = Montage.create(Object.prototype, { if (libName === contents[i].name) { //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, callback); + //Copying to cloud, adding blocking if no callback specified + if (!callback) { + //TODO: Add blocking logic here + this.copyDirectoryToCloud(path, contents[i], path); + } else { + this.copyDirectoryToCloud(path, contents[i], path, callback); + } }.bind(this)); break; } -- cgit v1.2.3