Merge pull request #5527 from adobe/pflynn/trailing-slash-cleanup

Better compartmentalize code that assumes no trailing "/"
This commit is contained in:
Jeff Booher committed 2013-10-22 10:17:33 -07:00
commit 8ca47a58a7
5 files changed
+83 -32

No files matched your search

@@ -73,7 +73,7 @@ define(function (require, exports, module) {
* regular expression.
*
* @param {Array.<string|RegExp>} settings
* @param {RegExp} defaultRegExp - default regular expression to use
* @param {?RegExp} defaultRegExp - default regular expression to use
* if none if provided.
* @return {RegExp} Regular expression that captures the array of string
* with optional wildcards.
@@ -239,7 +239,7 @@ define(function (require, exports, module) {
}
var testPath = ProjectManager.makeProjectRelativeIfPossible(path);
testPath = FileUtils.canonicalizeFolderPath(testPath);
testPath = FileUtils.stripTrailingSlash(testPath);
return excludes.test(testPath);
}
@@ -1022,7 +1022,7 @@ define(function (require, exports, module) {
}
}
dir = FileUtils.canonicalizeFolderPath(dir);
dir = FileUtils.stripTrailingSlash(dir);
forEachFileInDirectory(dir, doneCallback, fileCallback, directoryCallback);
}