mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-04 21:42:58 +00:00
Aligned to eslint rules and fixed following things:
This commit may contains behavioural changes. - Fix for the issue with corrupted log displays - Wrap the activeDocument - Reduced potential type errors and strengthened certain checks - Made error handling more robust (by rewriting the error class)
This commit is contained in:
@@ -50,6 +50,7 @@ import { hiddenFilesEventCount, hiddenFilesProcessingCount } from "../../lib/src
|
||||
import { EVENT_SETTING_SAVED, eventHub } from "../../common/events.ts";
|
||||
import { Semaphore } from "octagonal-wheels/concurrency/semaphore";
|
||||
import type { LiveSyncCore } from "../../main.ts";
|
||||
import { tryGetFilePath } from "@lib/common/utils.doc.ts";
|
||||
type SyncDirection = "push" | "pull" | "safe" | "pullForce" | "pushForce";
|
||||
|
||||
declare global {
|
||||
@@ -1047,7 +1048,7 @@ Offline Changed files: ${processFiles.length}`;
|
||||
}
|
||||
notifyProgress();
|
||||
} catch (ex) {
|
||||
this._log(`Failed to process storage change file:${file}`, logLevel);
|
||||
this._log(`Failed to process storage change file:${tryGetFilePath(file)}`, logLevel);
|
||||
this._log(ex, LOG_LEVEL_VERBOSE);
|
||||
}
|
||||
});
|
||||
@@ -1159,7 +1160,7 @@ Offline Changed files: ${files.length}`;
|
||||
await this.trackDatabaseFileModification(path, "[Scanning]", true, onlyNew, file);
|
||||
notifyProgress();
|
||||
} catch (ex) {
|
||||
this._log(`Failed to process database changes:${file}`);
|
||||
this._log(`Failed to process database changes:${tryGetFilePath(file)}`);
|
||||
this._log(ex, LOG_LEVEL_VERBOSE);
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user