Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/project/FileIndexManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ define(function (require, exports, module) {
*/
var _indexListDirty = true;

/**
* Store whether the index manager has exceeded the limit so the warning dialog only
* appears once.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: add @type {boolean} annotation

var _maxFileDialogDisplayed = false;

/** class FileIndex
*
* A FileIndex contains an array of fileInfos that meet the criteria specified by
Expand Down Expand Up @@ -218,7 +224,12 @@ define(function (require, exports, module) {
if (state.fileCount > 10000) {
if (!state.maxFilesHit) {
state.maxFilesHit = true;
_showMaxFilesDialog();
if (_maxFileDialogDisplayed === false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our standard style would be just if (!_maxFileDialogDisplayed)

_showMaxFilesDialog();
_maxFileDialogDisplayed = true;
} else {
console.log("Maximum files index limit exceeded " + state.fileCount);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.warn() seems more appropriate

}
}
return;
}
Expand All @@ -231,7 +242,6 @@ define(function (require, exports, module) {
_scanDirectoryRecurse(entry);
}
});

_finishDirScan(dirEntry);
},
// error callback
Expand Down
2 changes: 1 addition & 1 deletion src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ define(function (require, exports, module) {
* @return boolean true if the file should be displayed
*/
function shouldShow(entry) {
if ([".git", ".gitignore", ".gitmodules", ".svn", ".DS_Store", "Thumbs.db"].indexOf(entry.name) > -1) {
if ([".git", ".gitignore", ".gitmodules", ".svn", ".DS_Store", "Thumbs.db", ".hg"].indexOf(entry.name) > -1) {
return false;
}
var extension = entry.name.split('.').pop();
Expand Down