From a566bd469d17568f7bda492de662a87e96cb0d3e Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 17 Dec 2013 15:01:53 -0800 Subject: [PATCH] Use fs-plus.isFileSync to check path Previously fs::statSyncNoException not being null was used but it always returns an object or false so the first path checked was always being used. --- src/browser/atom-protocol-handler.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/atom-protocol-handler.coffee b/src/browser/atom-protocol-handler.coffee index 24fafd647..51806379b 100644 --- a/src/browser/atom-protocol-handler.coffee +++ b/src/browser/atom-protocol-handler.coffee @@ -1,5 +1,5 @@ app = require 'app' -fs = require 'fs' +fs = require 'fs-plus' path = require 'path' protocol = require 'protocol' @@ -24,5 +24,5 @@ class AtomProtocolHandler relativePath = path.normalize(request.url.substr(7)) for loadPath in @loadPaths filePath = path.join(loadPath, relativePath) - break if fs.statSyncNoException(filePath)? + break if fs.isFileSync(filePath) return new protocol.RequestFileJob(filePath)