mirror of
https://github.com/heroblackink/ultimate-todoist-sync-for-obsidian.git
synced 2026-07-22 07:40:27 +00:00
fix: skip storage directory files in modify event handler
Prevent infinite loop by skipping files in storage directory (logs, backups, reports) when handling vault modify events.
This commit is contained in:
parent
69cd489a66
commit
dee227c9da
1 changed files with 8 additions and 0 deletions
8
main.ts
8
main.ts
|
|
@ -228,6 +228,14 @@ export default class UltimateTodoistSyncForObsidian extends Plugin {
|
|||
this.isProcessingModify = true;
|
||||
|
||||
const filepath = file.path
|
||||
|
||||
// Skip files in storage directory (logs, backups, reports)
|
||||
const storagePath = this.storagePathManager?.getBasePath() || 'ultimate-todoist-sync';
|
||||
if (filepath.includes(storagePath)) {
|
||||
this.isProcessingModify = false;
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`${filepath} is modified`)
|
||||
|
||||
//get current view
|
||||
|
|
|
|||
Loading…
Reference in a new issue