aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-05-15 15:58:42 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-05-15 19:52:54 -0400
commitddf835588b1bb972d66ef34c3811b3e7459ee174 (patch)
tree6a8d2b7f1102d7d18cd2e1dfff9c1ba3b06ec08e /src
parentd02fe20f7c9dd1c0a820a5c9657180d2768c7e38 (diff)
Make FS_LOG work again
Use Module.print, since the print function doesn't seem to be accessible any more for some reason. Without this, enabling FS_LOG causes the browser's print UI to be invoked, which is pretty bad!
Diffstat (limited to 'src')
-rw-r--r--src/library.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/library.js b/src/library.js
index 9e56d42e..ea44f259 100644
--- a/src/library.js
+++ b/src/library.js
@@ -90,18 +90,18 @@ LibraryManager.library = {
#if FS_LOG
var inputPath = path;
function log() {
- print('FS.analyzePath("' + inputPath + '", ' +
- dontResolveLastLink + ', ' +
- linksVisited + ') => {' +
- 'isRoot: ' + ret.isRoot + ', ' +
- 'exists: ' + ret.exists + ', ' +
- 'error: ' + ret.error + ', ' +
- 'name: "' + ret.name + '", ' +
- 'path: "' + ret.path + '", ' +
- 'object: ' + ret.object + ', ' +
- 'parentExists: ' + ret.parentExists + ', ' +
- 'parentPath: "' + ret.parentPath + '", ' +
- 'parentObject: ' + ret.parentObject + '}');
+ Module['print']('FS.analyzePath("' + inputPath + '", ' +
+ dontResolveLastLink + ', ' +
+ linksVisited + ') => {' +
+ 'isRoot: ' + ret.isRoot + ', ' +
+ 'exists: ' + ret.exists + ', ' +
+ 'error: ' + ret.error + ', ' +
+ 'name: "' + ret.name + '", ' +
+ 'path: "' + ret.path + '", ' +
+ 'object: ' + ret.object + ', ' +
+ 'parentExists: ' + ret.parentExists + ', ' +
+ 'parentPath: "' + ret.parentPath + '", ' +
+ 'parentObject: ' + ret.parentObject + '}');
}
#endif
path = FS.absolutePath(path);
@@ -177,11 +177,11 @@ LibraryManager.library = {
// Creates a file system record: file, link, device or folder.
createObject: function(parent, name, properties, canRead, canWrite) {
#if FS_LOG
- print('FS.createObject("' + parent + '", ' +
- '"' + name + '", ' +
- JSON.stringify(properties) + ', ' +
- canRead + ', ' +
- canWrite + ')');
+ Module['print']('FS.createObject("' + parent + '", ' +
+ '"' + name + '", ' +
+ JSON.stringify(properties) + ', ' +
+ canRead + ', ' +
+ canWrite + ')');
#endif
if (!parent) parent = '/';
if (typeof parent === 'string') parent = FS.findObject(parent);