mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Return paths instead of deferred from project.getFilePaths
It was already being performed synchronously
This commit is contained in:
@@ -51,8 +51,6 @@ class Project
|
||||
@rootDirectory
|
||||
|
||||
getFilePaths: ->
|
||||
deferred = $.Deferred()
|
||||
|
||||
filePaths = []
|
||||
|
||||
onFile = (path) =>
|
||||
@@ -62,8 +60,7 @@ class Project
|
||||
return not @ignoreDirectory(path)
|
||||
|
||||
fs.traverseTree @getPath(), onFile, onDirectory
|
||||
deferred.resolve filePaths
|
||||
deferred
|
||||
filePaths
|
||||
|
||||
ignoreDirectory: (path) ->
|
||||
lastSlash = path.lastIndexOf('/')
|
||||
|
||||
@@ -52,7 +52,8 @@ class FuzzyFinder extends View
|
||||
@attach() if @paths?.length
|
||||
|
||||
populateProjectPaths: ->
|
||||
@rootView.project.getFilePaths().done (@paths) => @populatePathList()
|
||||
@paths = @rootView.project.getFilePaths()
|
||||
@populatePathList()
|
||||
|
||||
populateOpenBufferPaths: ->
|
||||
@paths = @rootView.getOpenBufferPaths().map (path) =>
|
||||
|
||||
Reference in New Issue
Block a user