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 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
8 changes: 4 additions & 4 deletions src/project/FileIndexManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ define(function (require, exports, module) {
//
function _addFileToIndexes(entry) {

// skip invisible files on mac
if (brackets.platform === "mac" && entry.name.charAt(0) === ".") {
// skip invisible files
if (!ProjectManager.shouldShow(entry)) {
return;
}

Expand Down Expand Up @@ -195,8 +195,8 @@ define(function (require, exports, module) {

// inner helper function
function _scanDirectoryRecurse(dirEntry) {
// skip invisible directories on mac
if (brackets.platform === "mac" && dirEntry.name.charAt(0) === ".") {
// skip invisible directories
if (!ProjectManager.shouldShow(dirEntry)) {
return;
}

Expand Down
5 changes: 3 additions & 2 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ define(function (require, exports, module) {
}

/** @param {Entry} entry File or directory to filter */
function _shouldShowInTree(entry) {
function shouldShow(entry) {
return [".git", ".svn", ".DS_Store", "Thumbs.db"].indexOf(entry.name) === -1;
}

Expand All @@ -484,7 +484,7 @@ define(function (require, exports, module) {
for (entryI = 0; entryI < entries.length; entryI++) {
entry = entries[entryI];

if (_shouldShowInTree(entry)) {
if (shouldShow(entry)) {
var jsonEntry = {
data: entry.name,
attr: { id: "node" + _projectInitialLoad.id++ },
Expand Down Expand Up @@ -892,6 +892,7 @@ define(function (require, exports, module) {
exports.getProjectRoot = getProjectRoot;
exports.isWithinProject = isWithinProject;
exports.makeProjectRelativeIfPossible = makeProjectRelativeIfPossible;
exports.shouldShow = shouldShow;
exports.openProject = openProject;
exports.loadProject = loadProject;
exports.getSelectedItem = getSelectedItem;
Expand Down