From b4aac37c5c87dc5d2432459f53360f7e8d988ca5 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Thu, 19 Dec 2013 09:08:44 -0500 Subject: [PATCH 1/3] removed unnecessary comment --- src/fs.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/fs.js b/src/fs.js index a6060b7..e28d71e 100644 --- a/src/fs.js +++ b/src/fs.js @@ -1048,7 +1048,6 @@ define(function(require) { } } - //check if atime and mtime are integers and >= 0 if (typeof atime != 'number' || typeof mtime != 'number') { callback(new EInvalid('atime and mtime must be number')); } @@ -1073,7 +1072,6 @@ define(function(require) { } } - //check if atime and mtime are integers and >= 0 if (typeof atime != 'number' || typeof mtime != 'number') { callback(new EInvalid('atime and mtime must be a number')); } From c62fe44fcd53f2976792b4978c34049f80160f97 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Thu, 19 Dec 2013 09:10:49 -0500 Subject: [PATCH 2/3] minor correction to test description --- tests/spec/fs.utimes.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/fs.utimes.spec.js b/tests/spec/fs.utimes.spec.js index ed3cd9b..fbc14cd 100644 --- a/tests/spec/fs.utimes.spec.js +++ b/tests/spec/fs.utimes.spec.js @@ -274,7 +274,7 @@ define(["IDBFS"], function(IDBFS) { }); }); - it ('should update atime and mtime if they are null', function () { + it ('should update atime and mtime when they are null', function () { var complete = false; var _error; var that = this; From 418d0bacf1467b05be2b9b2a1f0a702b43c37954 Mon Sep 17 00:00:00 2001 From: Barry Tulchinsky Date: Fri, 20 Dec 2013 12:04:31 -0500 Subject: [PATCH 3/3] corrected calling the callback function if failed to queue operation for utimes --- src/fs.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fs.js b/src/fs.js index e28d71e..4f7e39b 100644 --- a/src/fs.js +++ b/src/fs.js @@ -1956,6 +1956,10 @@ define(function(require) { _utimes(context, path, atime, mtime, callback); } ); + + if (error) { + callback(error); + } }; FileSystem.prototype.futimes = function(fd, atime, mtime, callback) { callback = maybeCallback(callback); @@ -1966,6 +1970,10 @@ define(function(require) { _futimes(fs, context, fd, atime, mtime, callback); } ); + + if (error) { + callback(error); + } }; return {