mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 18:24:09 +03:00
Remove directories from fuzzy-finder
This commit is contained in:
parent
6f6dfe78a9
commit
a6a05b6ff4
@ -16,8 +16,8 @@ var $native = {};
|
||||
native function traverseTree(path, onFile, onDirectory);
|
||||
$native.traverseTree = traverseTree;
|
||||
|
||||
native function getAllPathsAsync(path, callback);
|
||||
$native.getAllPathsAsync = getAllPathsAsync;
|
||||
native function getAllFilePathsAsync(path, callback);
|
||||
$native.getAllFilePathsAsync = getAllFilePathsAsync;
|
||||
|
||||
native function isFile(path);
|
||||
$native.isFile = isFile;
|
||||
|
@ -103,7 +103,7 @@ bool Native::Execute(const CefString& name,
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (name == "getAllPathsAsync") {
|
||||
else if (name == "getAllFilePathsAsync") {
|
||||
std::string argument = arguments[0]->GetStringValue().ToString();
|
||||
CefRefPtr<CefV8Value> callback = arguments[1];
|
||||
CefRefPtr<CefV8Context> context = CefV8Context::GetCurrentContext();
|
||||
@ -127,8 +127,7 @@ bool Native::Execute(const CefString& name,
|
||||
}
|
||||
|
||||
bool isFile = entry->fts_info == FTS_NSOK;
|
||||
bool isDir = entry->fts_info == FTS_D;
|
||||
if (!isFile && !isDir) {
|
||||
if (!isFile) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class Project
|
||||
|
||||
getFilePaths: ->
|
||||
deferred = $.Deferred()
|
||||
fs.getAllPathsAsync @getPath(), (paths) =>
|
||||
fs.getAllFilePathsAsync @getPath(), (paths) =>
|
||||
paths = paths.filter (path) => not @isPathIgnored(path)
|
||||
deferred.resolve(paths)
|
||||
deferred.promise()
|
||||
|
@ -112,8 +112,8 @@ module.exports =
|
||||
@makeTree(@directory(path))
|
||||
@makeDirectory(path)
|
||||
|
||||
getAllPathsAsync: (rootPath, callback) ->
|
||||
$native.getAllPathsAsync(rootPath, callback)
|
||||
getAllFilePathsAsync: (rootPath, callback) ->
|
||||
$native.getAllFilePathsAsync(rootPath, callback)
|
||||
|
||||
traverseTree: (rootPath, onFile, onDirectory) ->
|
||||
$native.traverseTree(rootPath, onFile, onDirectory)
|
||||
|
Loading…
Reference in New Issue
Block a user