From 88cbac0e86531ed9cbf895203b80718f0ee407e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jim=C3=A9nez=20Rivera?= Date: Mon, 3 Feb 2025 18:46:14 +0100 Subject: [PATCH] Fix disconnect addon sync root path --- src/addon-wrapper.ts | 5 +---- src/virtual-drive.ts | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/addon-wrapper.ts b/src/addon-wrapper.ts index f6a5827e..2220599b 100644 --- a/src/addon-wrapper.ts +++ b/src/addon-wrapper.ts @@ -13,19 +13,16 @@ export class Addon { } registerSyncRoot({ - syncRootPath, providerName, providerVersion, providerId, logoPath, }: { - syncRootPath: string; providerName: string; providerVersion: string; providerId: string; logoPath: string; }) { - this.syncRootPath = syncRootPath; const result = addon.registerSyncRoot(this.syncRootPath, providerName, providerVersion, providerId, logoPath); return this.parseAddonZod("registerSyncRoot", result); } @@ -41,7 +38,7 @@ export class Addon { } disconnectSyncRoot() { - addon.disconnectSyncRoot(this.syncRootPath); + return addon.disconnectSyncRoot(this.syncRootPath); } addLogger({ logPath }: { logPath: string }) { diff --git a/src/virtual-drive.ts b/src/virtual-drive.ts index cc56a494..c806346c 100644 --- a/src/virtual-drive.ts +++ b/src/virtual-drive.ts @@ -28,6 +28,7 @@ class VirtualDrive { }; this.watcher = new Watcher(); + addon.syncRootPath = syncRootPath; this.syncRootPath = syncRootPath; this.createSyncRootFolder(); @@ -190,7 +191,6 @@ class VirtualDrive { ): Promise { this.callbacks = callbacks; return addon.registerSyncRoot({ - syncRootPath: this.syncRootPath, providerName, providerVersion, providerId, @@ -384,7 +384,7 @@ class VirtualDrive { } } - disconnectSyncRoot(): any { + disconnectSyncRoot() { return addon.disconnectSyncRoot(); }