mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-12 10:35:25 +00:00
Improved:
- Reduced remote database checking to improve speed and reduce bandwidth. Fixed: - Chunks which previously misinterpreted are now interpreted correctly. - Deleted file detection on hidden file synchronising now works fine. - Now the Customisation sync is surely quiet while it has been disabled.
This commit is contained in:
@@ -495,7 +495,7 @@ export class HiddenFileSync extends LiveSyncCommands {
|
||||
const mtime = new Date().getTime();
|
||||
await runWithLock("file-" + prefixedFileName, false, async () => {
|
||||
try {
|
||||
const old = await this.localDatabase.getDBEntry(prefixedFileName, null, false, false) as InternalFileEntry | false;
|
||||
const old = await this.localDatabase.getDBEntryMeta(prefixedFileName, null, true) as InternalFileEntry | false;
|
||||
let saveData: InternalFileEntry;
|
||||
if (old === false) {
|
||||
saveData = {
|
||||
@@ -541,7 +541,7 @@ export class HiddenFileSync extends LiveSyncCommands {
|
||||
try {
|
||||
// Check conflicted status
|
||||
//TODO option
|
||||
const fileOnDB = await this.localDatabase.getDBEntry(prefixedFileName, { conflicts: true }, false, false);
|
||||
const fileOnDB = await this.localDatabase.getDBEntry(prefixedFileName, { conflicts: true }, false, true);
|
||||
if (fileOnDB === false)
|
||||
throw new Error(`File not found on database.:${filename}`);
|
||||
// Prevent overwrite for Prevent overwriting while some conflicted revision exists.
|
||||
|
||||
Reference in New Issue
Block a user