From d8ea07468b1aebdd32e8a36a8cb5511203be4630 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 9 Oct 2012 09:14:38 -0700 Subject: [PATCH] Include FTS_PHYSICAL when calling fts_open --- native/v8_extensions/native.mm | 4 ++-- src/app/project.coffee | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/native/v8_extensions/native.mm b/native/v8_extensions/native.mm index 10fcbd035..aca4e49cf 100644 --- a/native/v8_extensions/native.mm +++ b/native/v8_extensions/native.mm @@ -104,7 +104,7 @@ bool Native::Execute(const CefString& name, strcpy(rootPath, argument.c_str()); char * const paths[] = {rootPath, NULL}; - FTS *tree = fts_open(paths, FTS_NOCHDIR | FTS_NOSTAT, NULL); + FTS *tree = fts_open(paths, FTS_PHYSICAL| FTS_NOCHDIR | FTS_NOSTAT, NULL); if (tree == NULL) return true; @@ -150,7 +150,7 @@ bool Native::Execute(const CefString& name, char rootPath[argument.size() + 1]; strcpy(rootPath, argument.c_str()); char * const paths[] = {rootPath, NULL}; - FTS *tree = fts_open(paths, FTS_NOCHDIR | FTS_NOSTAT, NULL); + FTS *tree = fts_open(paths, FTS_PHYSICAL | FTS_NOCHDIR | FTS_NOSTAT, NULL); retval = CefV8Value::CreateArray(0); int index = 0; if (tree != NULL) { diff --git a/src/app/project.coffee b/src/app/project.coffee index 323d98f0b..a46769925 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -55,13 +55,18 @@ class Project filePaths = [] + count = 0 + start = new Date().getTime() onFile = (path) => + count++ filePaths.push(path) unless @ignoreFile(path) onDirectory = (path) => + count++ return not @ignoreDirectory(path) fs.traverseTree @getPath(), onFile, onDirectory + console.log "#{count} paths in #{new Date().getTime()-start}ms" deferred.resolve filePaths deferred