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

Commit

Permalink
Fixed issue #758 (#877)
Browse files Browse the repository at this point in the history
#758 - Don't refresh file view if only file contents have changed.
On my machine, I observed the view constantly refreshing when in my home directory.  This was due to a file being frequently updated (.xsession-errors).  Each time this file was updated, the fw.watch callback was triggered and the view was refreshed.
  • Loading branch information
wrac4242 authored Nov 10, 2020
1 parent 53fbdba commit 1e9a600
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/classes/filesystem.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ class FilesystemDisplay {
if (this._fsWatcher) {
this._fsWatcher.close();
}
this._fsWatcher = fs.watch(dir, () => {
this._runNextTick = true;
this._fsWatcher = fs.watch(dir, (eventType, filename) => {
if (eventType != "change") { // #758 - Don't refresh file view if only file contents have changed.
this._runNextTick = true;
}
});
};

Expand Down

0 comments on commit 1e9a600

Please sign in to comment.