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

Commit

Permalink
Do not add entry to an index if it's filtered out.
Browse files Browse the repository at this point in the history
This will prevent calls to FileSystem.resolve on excluded entries to add them
to FileSystem index, thus avoiding generating fs events on these.
  • Loading branch information
busykai committed Jan 4, 2015
1 parent 5d181f5 commit 6514f20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/filesystem/FileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,9 @@ define(function (require, exports, module) {

if (!entry) {
entry = new EntryConstructor(path, this);
this._index.addEntry(entry);
if (this._indexFilter(path, entry.name)) {
this._index.addEntry(entry);
}
}

return entry;
Expand Down

0 comments on commit 6514f20

Please sign in to comment.