mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
make isExcludedFiles work right when the preferences do not specify any exclusions
This commit is contained in:
1 parent
fff10de605
commit
ce5aabc045
1 file changed
+10
-7
@@ -201,18 +201,21 @@ define(function (require, exports, module) {
|
||||
* @return {boolean} true if excluded, false otherwise.
|
||||
*/
|
||||
function isFileExcluded(file) {
|
||||
if (file.name[0] === ".") {
|
||||
return true;
|
||||
}
|
||||
|
||||
var languageID = LanguageManager.getLanguageForPath(file.fullPath).getId();
|
||||
if (languageID !== HintUtils.LANGUAGE_ID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var excludes = preferences.getExcludedFiles();
|
||||
|
||||
if (!excludes) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var languageID = LanguageManager.getLanguageForPath(file.fullPath).getId();
|
||||
if (languageID === HintUtils.LANGUAGE_ID) {
|
||||
return file.name[0] === "." || excludes.test(file.name);
|
||||
}
|
||||
|
||||
return true;
|
||||
return excludes.test(file.name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user