From b0328d37e8a4aeb50aa7ed848f1070a98535262c Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 27 Mar 2014 05:44:02 +1100 Subject: [PATCH 1/2] Exclude .git files from console warnings --- src/filesystem/impls/appshell/AppshellFileSystem.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 2bb48aa3845..7555393d424 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -35,6 +35,9 @@ define(function (require, exports, module) { var FILE_WATCHER_BATCH_TIMEOUT = 200; // 200ms - granularity of file watcher changes + /** exclude .git files from warnings as they appear and disappear very quickly and pollute the console */ + var warningBlacklist = /\/\.git\//; + /** * Callback to notify FileSystem of watcher changes * @type {?function(string, FileSystemStats=)} @@ -91,7 +94,9 @@ define(function (require, exports, module) { if (needsStats) { exports.stat(path, function (err, stats) { if (err) { - console.warn("Unable to stat changed path: ", path, err); + if (!warningBlacklist.test(path)) { + console.warn("Unable to stat changed path: ", path, err); + } return; } _changeCallback(path, stats); From 647428d1c4dbcd3cf65ac7a8b23c375965543faf Mon Sep 17 00:00:00 2001 From: Martin Zagora Date: Thu, 27 Mar 2014 06:34:57 +1100 Subject: [PATCH 2/2] Remove the warning completely, leave comment for reference --- src/filesystem/impls/appshell/AppshellFileSystem.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js index 7555393d424..46f8d673064 100644 --- a/src/filesystem/impls/appshell/AppshellFileSystem.js +++ b/src/filesystem/impls/appshell/AppshellFileSystem.js @@ -34,9 +34,6 @@ define(function (require, exports, module) { NodeDomain = require("utils/NodeDomain"); var FILE_WATCHER_BATCH_TIMEOUT = 200; // 200ms - granularity of file watcher changes - - /** exclude .git files from warnings as they appear and disappear very quickly and pollute the console */ - var warningBlacklist = /\/\.git\//; /** * Callback to notify FileSystem of watcher changes @@ -94,9 +91,8 @@ define(function (require, exports, module) { if (needsStats) { exports.stat(path, function (err, stats) { if (err) { - if (!warningBlacklist.test(path)) { - console.warn("Unable to stat changed path: ", path, err); - } + // warning has been removed due to spamming the console - see #7332 + // console.warn("Unable to stat changed path: ", path, err); return; } _changeCallback(path, stats);