Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Update _shouldShowInTree to only hide specified hidden files. #1165

Merged
merged 1 commit into from
Jun 27, 2012
Merged
Changes from all commits
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
10 changes: 1 addition & 9 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,7 @@ define(function (require, exports, module) {

/** @param {Entry} entry File or directory to filter */
function _shouldShowInTree(entry) {
if (entry.name[0] === ".") { // "." prefix is always hidden on Mac
return false;
}

if (entry.name === "Thumbs.db") { // "Thumbs.db" hidden file auto-generated by Win
return false;
}

return true;
return [".git", ".svn", ".DS_Store", "Thumbs.db"].indexOf(entry.name) === -1;
Copy link
Member

Choose a reason for hiding this comment

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

This solution is good enough for now (or at least it's better than before). Our preferences stories haven't been refined enough, so I went ahead and captured the need for custom file filtering in the backlog. https://trello.com/c/OmPlSisf.

}

/**
Expand Down