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.
This commit is contained in:
Kevin Sawicki
2013-12-17 15:01:53 -08:00
parent 389586bb41
commit a566bd469d

View File

@@ -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)