File tree Expand file tree Collapse file tree
apps/sim/connectors/obsidian Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,12 +216,13 @@ export const obsidianConnector: ConnectorConfig = {
216216 const pageFiles = allFiles . slice ( offset , offset + DOCS_PER_PAGE )
217217
218218 /**
219- * Stub hash uses path only because the Obsidian Local REST API directory
220- * listing returns just `{ files: string[] }` — no `stat`/`mtime` and no
221- * `HEAD` support to read `Last-Modified`. A path-only stub is stable
222- * across syncs, so unchanged paths short-circuit re-hydration in the
223- * sync engine. `getDocument` always re-hashes with `mtime`, which
224- * triggers a refresh whenever the file actually changes.
219+ * The Obsidian Local REST API directory listing returns just
220+ * `{ files: string[] }` — no `stat`/`mtime` and no `HEAD` support to read
221+ * `Last-Modified`, so the stub cannot encode change-detection state. Every
222+ * file is therefore re-hydrated via `getDocument` on every sync. The
223+ * post-hydration hash compare in the sync engine
224+ * (`existing.contentHash === hydratedHash`) prevents redundant DB writes
225+ * when `mtime` is unchanged.
225226 */
226227 const documents : ExternalDocument [ ] = pageFiles . map ( ( filePath ) => ( {
227228 externalId : filePath ,
You can’t perform that action at this time.
0 commit comments