From bb04cce8266b2508d6775e86d3d2d21594cbfca8 Mon Sep 17 00:00:00 2001 From: zmhassan Date: Mon, 20 Jan 2014 14:12:08 -0500 Subject: [PATCH] Fixed linting issues found with Grunt --- src/fs.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/fs.js b/src/fs.js index c76e4f5..31e2167 100644 --- a/src/fs.js +++ b/src/fs.js @@ -1165,7 +1165,7 @@ define(function(require) { else if (!name) { callback(new EInvalid('attribute name cannot be an empty string')); } - else if (flag != null && + else if (flag !== null && flag !== XATTR_CREATE && flag !== XATTR_REPLACE) { callback(new EInvalid('invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE')); } @@ -1182,7 +1182,7 @@ define(function(require) { else if (!name) { callback(new EInvalid('attribute name cannot be an empty string')); } - else if (flag != null && + else if (flag !== null && flag !== XATTR_CREATE && flag !== XATTR_REPLACE) { callback(new EInvalid('invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE')); } @@ -1760,7 +1760,7 @@ define(function(require) { else { callback(null); } - }; + } setxattr_file(context, path, name, value, flag, check_result); } @@ -1800,14 +1800,14 @@ define(function(require) { } } - removexattr_file (context, path, name, remove_xattr); + removexattr_file (context, path, name, remove_xattr); } function _fremovexattr (fs, context, fd, name, callback) { function remove_xattr (error) { if (error) { - callback(error); + callback(error); } else { callback(null); @@ -1905,7 +1905,7 @@ define(function(require) { callback(null); } } - utimes_file(context, path, atime, mtime, check_result) + utimes_file(context, path, atime, mtime, check_result); } function _futimes(fs, context, fd, atime, mtime, callback) { @@ -1918,7 +1918,7 @@ define(function(require) { } } - var currentTime = Date.now() + var currentTime = Date.now(); atime = (atime) ? atime : currentTime; mtime = (mtime) ? mtime : currentTime; @@ -2297,7 +2297,7 @@ define(function(require) { } }; FileSystem.prototype.setxattr = function (path, name, value, flag, callback) { - var callback = maybeCallback(arguments[arguments.length - 1]); + callback = maybeCallback(arguments[arguments.length - 1]); var _flag = (typeof flag != 'function') ? flag : null; var fs = this; var error = fs.queueOrRun( @@ -2326,7 +2326,7 @@ define(function(require) { } }; FileSystem.prototype.fsetxattr = function (fd, name, value, flag, callback) { - var callback = maybeCallback(arguments[arguments.length - 1]); + callback = maybeCallback(arguments[arguments.length - 1]); var _flag = (typeof flag != 'function') ? flag : null; var fs = this; var error = fs.queueOrRun(