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

Commit 1e9a600

Browse files
authored
Fixed issue #758 (#877)
#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.
1 parent 53fbdba commit 1e9a600

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/classes/filesystem.class.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ class FilesystemDisplay {
123123
if (this._fsWatcher) {
124124
this._fsWatcher.close();
125125
}
126-
this._fsWatcher = fs.watch(dir, () => {
127-
this._runNextTick = true;
126+
this._fsWatcher = fs.watch(dir, (eventType, filename) => {
127+
if (eventType != "change") { // #758 - Don't refresh file view if only file contents have changed.
128+
this._runNextTick = true;
129+
}
128130
});
129131
};
130132

0 commit comments

Comments
 (0)