mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-04 07:18:18 +00:00
Fixed:
- Fixed the Infinity loop
This commit is contained in:
1 parent
c18b5c24b4
commit
d9b69d9a1b
1 file changed
+6
-1
+6
-1
@@ -841,7 +841,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
||||
}
|
||||
}
|
||||
clearTrigger("applyBatchAuto");
|
||||
const ret = await runWithLock("procFiles", false, async () => {
|
||||
const ret = await runWithLock("procFiles", true, async () => {
|
||||
do {
|
||||
const procs = [...this.watchedFileEventQueue];
|
||||
this.watchedFileEventQueue = [];
|
||||
for (const queue of procs) {
|
||||
@@ -877,6 +878,8 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
||||
}
|
||||
}
|
||||
this.refreshStatusText();
|
||||
} while (this.watchedFileEventQueue.length != 0);
|
||||
return true;
|
||||
})
|
||||
this.refreshStatusText();
|
||||
return ret;
|
||||
@@ -917,8 +920,10 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
|
||||
}
|
||||
|
||||
async applyBatchChange() {
|
||||
if (this.settings.batchSave) {
|
||||
return await this.procFileEvent(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Watch raw events (Internal API)
|
||||
watchVaultRawEvents(path: string) {
|
||||
|
||||
Reference in new issue
Block a user