mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Check recurse flag before verifying path is directory
Avoid an unnecessary native call if recursing into the current path has already been avoided.
This commit is contained in:
@@ -109,7 +109,7 @@ module.exports =
|
||||
for path in @list(rootPath)
|
||||
recurse = true
|
||||
fn(path, prune)
|
||||
@traverseTree(path, fn) if @isDirectory(path) and recurse
|
||||
@traverseTree(path, fn) if recurse and @isDirectory(path)
|
||||
|
||||
lastModified: (path) ->
|
||||
$native.lastModified(path)
|
||||
|
||||
Reference in New Issue
Block a user