Skip to content

Commit

Permalink
Merge branch 'master' into jsdom
Browse files Browse the repository at this point in the history
  • Loading branch information
cadorn committed Jun 1, 2012
2 parents 868dbef + fc9a5ab commit c0bd7a8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/DAV/plugins/filelist.js
Expand Up @@ -14,6 +14,7 @@ var jsDAV_Codesearch_Plugin = require("./codesearch");
var Spawn = require("child_process").spawn;
var Util = require("./../util");
var GnuTools = require("gnu-tools");
var platform = require("os").platform();

function jsDAV_Filelist_Plugin(handler) {
this.handler = handler;
Expand Down Expand Up @@ -81,9 +82,13 @@ jsDAV_Filelist_Plugin.FIND_CMD = GnuTools.FIND_CMD;
"\\.git", "\\.hg", "\\.pc", "\\.svn", "blib",
"CVS", "RCS", "SCCS", "\.DS_Store"
];



var args = ["-L", ".", "-type", "f", "-a"];

if (platform === "darwin")
args.unshift("-E");

//Hidden Files
if (options.showHiddenFiles == "1")
args.push("!", "-regex", "\\/\\.[^\\/]*$");
Expand All @@ -96,7 +101,8 @@ jsDAV_Filelist_Plugin.FIND_CMD = GnuTools.FIND_CMD;
args.push("!", "-regex", ".*\\/" + pattern + "\\/.*");
});

args.push("-regextype", "posix-extended", "-print");
if (platform !== "darwin")
args.push("-regextype", "posix-extended", "-print");

if (jsDAV.debugMode)
Util.log("search command: " + jsDAV_Filelist_Plugin.FIND_CMD + args.join(" "));
Expand Down

0 comments on commit c0bd7a8

Please sign in to comment.