Compare commits

...

5 Commits

Author SHA1 Message Date
vorotamoroz
f7209e566c bump 2023-10-24 10:07:29 +01:00
vorotamoroz
4a9ab2d1de Fixed:
- No longer enumerating file names is broken.
2023-10-24 10:07:17 +01:00
vorotamoroz
cb74b5ee93 - Fixed
- Now empty file could be decoded.
    - Local files are no longer pre-saved before fetching from a remote database.
    - No longer deadlock while applying customisation sync.
    - Configuration with multiple files is now able to be applied correctly.
    - Deleting folder propagation now works without enabling the use of a trash bin.
2023-10-24 09:54:56 +01:00
vorotamoroz
60eecd7001 bump 2023-10-17 12:00:59 +09:00
vorotamoroz
4bd7b54bcd Fixed:
- Now the files which having digit or character prefixes in the path will not be ignored.
2023-10-17 12:00:19 +09:00
9 changed files with 24 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
{ {
"id": "obsidian-livesync", "id": "obsidian-livesync",
"name": "Self-hosted LiveSync", "name": "Self-hosted LiveSync",
"version": "0.20.4", "version": "0.20.6",
"minAppVersion": "0.9.12", "minAppVersion": "0.9.12",
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.", "description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
"author": "vorotamoroz", "author": "vorotamoroz",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "obsidian-livesync", "name": "obsidian-livesync",
"version": "0.20.4", "version": "0.20.6",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "obsidian-livesync", "name": "obsidian-livesync",
"version": "0.20.4", "version": "0.20.6",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"diff-match-patch": "^1.0.5", "diff-match-patch": "^1.0.5",

View File

@@ -1,6 +1,6 @@
{ {
"name": "obsidian-livesync", "name": "obsidian-livesync",
"version": "0.20.4", "version": "0.20.6",
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.", "description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
"main": "main.js", "main": "main.js",
"type": "module", "type": "module",

View File

@@ -111,6 +111,7 @@ function deserialize2(str: string): PluginDataEx {
data data
} }
) )
tokens.nextLine();
} while (filename); } while (filename);
return result; return result;
} }
@@ -352,11 +353,13 @@ export class ConfigSync extends LiveSyncCommands {
} }
} }
Logger(`All files enumerated`, logLevel, "get-plugins"); Logger(`All files enumerated`, logLevel, "get-plugins");
pluginIsEnumerating.set(false);
this.createMissingConfigurationEntry(); this.createMissingConfigurationEntry();
} finally { } finally {
pluginIsEnumerating.set(false); pluginIsEnumerating.set(false);
} }
}); });
pluginIsEnumerating.set(false);
}); });
// return entries; // return entries;
} }

View File

@@ -207,21 +207,21 @@
const local = list.find((e) => e.term == thisTerm); const local = list.find((e) => e.term == thisTerm);
const selectedItem = list.find((e) => e.term == selected); const selectedItem = list.find((e) => e.term == selected);
if (selectedItem && (await applyData(selectedItem))) { if (selectedItem && (await applyData(selectedItem))) {
scheduleTask("update-plugin-list", 250, () => addOn.updatePluginList(true, local.documentPath)); addOn.updatePluginList(true, local?.documentPath);
} }
} }
async function compareSelected() { async function compareSelected() {
const local = list.find((e) => e.term == thisTerm); const local = list.find((e) => e.term == thisTerm);
const selectedItem = list.find((e) => e.term == selected); const selectedItem = list.find((e) => e.term == selected);
if (local && selectedItem && (await compareData(local, selectedItem))) { 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() { async function deleteSelected() {
const selectedItem = list.find((e) => e.term == selected); const selectedItem = list.find((e) => e.term == selected);
// const deletedPath = selectedItem.documentPath; // const deletedPath = selectedItem.documentPath;
if (selectedItem && (await deleteData(selectedItem))) { if (selectedItem && (await deleteData(selectedItem))) {
scheduleTask("update-plugin-list", 250, () => addOn.reloadPluginList(true)); addOn.reloadPluginList(true);
} }
} }
async function duplicateItem() { async function duplicateItem() {

Submodule src/lib updated: b2788a8d98...b099865cee

View File

@@ -1327,13 +1327,13 @@ Note: We can always able to read V1 format. It will be progressively converted.
if (this.settings.trashInsteadDelete) { if (this.settings.trashInsteadDelete) {
await this.app.vault.trash(file, false); await this.app.vault.trash(file, false);
} else { } else {
await this.app.vault.delete(file); await this.app.vault.delete(file, true);
} }
Logger(`xxx <- STORAGE (deleted) ${file.path}`); Logger(`xxx <- STORAGE (deleted) ${file.path}`);
Logger(`files: ${dir.children.length}`); Logger(`files: ${dir.children.length}`);
if (dir.children.length == 0) { if (dir.children.length == 0) {
if (!this.settings.doNotDeleteFolder) { 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); await this.deleteVaultItem(dir);
} }
} }

View File

@@ -481,7 +481,7 @@ export const requestToCouchDB = async (baseUri: string, username: string, passwo
export async function performRebuildDB(plugin: ObsidianLiveSyncPlugin, method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice") { export async function performRebuildDB(plugin: ObsidianLiveSyncPlugin, method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice") {
if (method == "localOnly") { if (method == "localOnly") {
await plugin.addOnSetup.fetchLocalWithKeepLocal(); await plugin.addOnSetup.fetchLocal();
} }
if (method == "remoteOnly") { if (method == "remoteOnly") {
await plugin.addOnSetup.rebuildRemote(); await plugin.addOnSetup.rebuildRemote();

View File

@@ -15,6 +15,16 @@ This format change gives us the ability to detect some `marks` in the binary fil
Now only a few chunks are transferred, even if we add a comment to the PDF or put new files into the ZIP archives. Now only a few chunks are transferred, even if we add a comment to the PDF or put new files into the ZIP archives.
#### Version history #### Version history
- 0.20.6
- Fixed
- Now empty file could be decoded.
- Local files are no longer pre-saved before fetching from a remote database.
- No longer deadlock while applying customisation sync.
- Configuration with multiple files is now able to be applied correctly.
- Deleting folder propagation now works without enabling the use of a trash bin.
- 0.20.5
- Fixed
- Now the files which having digit or character prefixes in the path will not be ignored.
- 0.20.4 - 0.20.4
- Fixed - Fixed
- The text-input-dialogue is no longer broken. - The text-input-dialogue is no longer broken.