Skip to content

Commit 53773fc

Browse files
committed
Don't start new watches on Linux after every scan
1 parent 09b8e78 commit 53773fc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ module.exports = class HotReload extends Plugin {
1313
}
1414

1515
watch(path) {
16-
if (watchNeeded) this.app.vault.adapter.startWatchPath(path, false);
16+
if (!watchNeeded) return;
17+
if (this.app.vault.adapter.watchers.hasOwnProperty(path)) return;
18+
return this.app.vault.adapter.startWatchPath(path, false);
1719
}
1820

1921
async getPluginNames() {

0 commit comments

Comments
 (0)