mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Merge pull request #5527 from adobe/pflynn/trailing-slash-cleanup
Better compartmentalize code that assumes no trailing "/"
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user