make isExcludedFiles work right when the preferences do not specify any exclusions

This commit is contained in:
Ian Wehrman committed 2013-11-20 14:55:13 -08:00
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);
}
/**