diff --git a/src/CmdConfigSync.ts b/src/CmdConfigSync.ts index d25db1f..225b212 100644 --- a/src/CmdConfigSync.ts +++ b/src/CmdConfigSync.ts @@ -111,6 +111,7 @@ function deserialize2(str: string): PluginDataEx { data } ) + tokens.nextLine(); } while (filename); return result; } @@ -352,11 +353,13 @@ export class ConfigSync extends LiveSyncCommands { } } Logger(`All files enumerated`, logLevel, "get-plugins"); + pluginIsEnumerating.set(false); this.createMissingConfigurationEntry(); } finally { pluginIsEnumerating.set(false); } }); + pluginIsEnumerating.set(false); }); // return entries; } diff --git a/src/PluginCombo.svelte b/src/PluginCombo.svelte index 057fec1..3634353 100644 --- a/src/PluginCombo.svelte +++ b/src/PluginCombo.svelte @@ -207,21 +207,21 @@ const local = list.find((e) => e.term == thisTerm); const selectedItem = list.find((e) => e.term == selected); if (selectedItem && (await applyData(selectedItem))) { - scheduleTask("update-plugin-list", 250, () => addOn.updatePluginList(true, local.documentPath)); + addOn.updatePluginList(true, local?.documentPath); } } async function compareSelected() { const local = list.find((e) => e.term == thisTerm); const selectedItem = list.find((e) => e.term == selected); if (local && selectedItem && (await compareData(local, selectedItem))) { - scheduleTask("update-plugin-list", 250, () => addOn.updatePluginList(true, local.documentPath)); + addOn.updatePluginList(true, local.documentPath); } } async function deleteSelected() { const selectedItem = list.find((e) => e.term == selected); // const deletedPath = selectedItem.documentPath; if (selectedItem && (await deleteData(selectedItem))) { - scheduleTask("update-plugin-list", 250, () => addOn.reloadPluginList(true)); + addOn.reloadPluginList(true); } } async function duplicateItem() { diff --git a/src/lib b/src/lib index 259179b..89d2707 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 259179be15fdc190ca91a153ba1386de184f7f0e +Subproject commit 89d2707c21d096d55f8448859cd5eab160bdc92d diff --git a/src/main.ts b/src/main.ts index 85213e2..8cd63d8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1327,13 +1327,13 @@ Note: We can always able to read V1 format. It will be progressively converted. if (this.settings.trashInsteadDelete) { await this.app.vault.trash(file, false); } else { - await this.app.vault.delete(file); + await this.app.vault.delete(file, true); } Logger(`xxx <- STORAGE (deleted) ${file.path}`); Logger(`files: ${dir.children.length}`); if (dir.children.length == 0) { if (!this.settings.doNotDeleteFolder) { - Logger(`All files under the parent directory (${dir}) have been deleted, so delete this one.`); + Logger(`All files under the parent directory (${dir.path}) have been deleted, so delete this one.`); await this.deleteVaultItem(dir); } } diff --git a/src/utils.ts b/src/utils.ts index e22f042..6a4c2dd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -481,7 +481,7 @@ export const requestToCouchDB = async (baseUri: string, username: string, passwo export async function performRebuildDB(plugin: ObsidianLiveSyncPlugin, method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice") { if (method == "localOnly") { - await plugin.addOnSetup.fetchLocalWithKeepLocal(); + await plugin.addOnSetup.fetchLocal(); } if (method == "remoteOnly") { await plugin.addOnSetup.rebuildRemote();