mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-11 02:01:52 +00:00
Tidied:
- Add some note for corrupting notice - Array function standardised. Fixed: - Remove obsoleted accessing to Obsidian's global. - Avoiding errors in exceptional circumstances. - Removal of several outdated and inefficient QueueProcessor implementations - Log output is now a bit efficient.
This commit is contained in:
@@ -266,7 +266,10 @@ export class ModuleFileHandler extends AbstractModule {
|
||||
// Check the file is not corrupted
|
||||
// (Zero is a special case, may be created by some APIs and it might be acceptable).
|
||||
if (docRead.size != 0 && docRead.size !== readAsBlob(docRead).size) {
|
||||
this._log(`File ${path} seems to be corrupted! Writing prevented.`, LOG_LEVEL_NOTICE);
|
||||
this._log(
|
||||
`File ${path} seems to be corrupted! Writing prevented. (${docRead.size} != ${readAsBlob(docRead).size})`,
|
||||
LOG_LEVEL_NOTICE
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ export class ReplicateResultProcessor {
|
||||
return;
|
||||
} finally {
|
||||
// Remove from processing queue
|
||||
this._processingChanges.remove(change);
|
||||
this._processingChanges = this._processingChanges.filter((e) => e === change);
|
||||
this.triggerTakeSnapshot();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user