From 43dc3843c4cf5324aaece49be4cc86dc04c6f345 Mon Sep 17 00:00:00 2001 From: Montassar Ghanmy Date: Tue, 7 Nov 2023 14:42:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Remove=20trailing=20sla?= =?UTF-8?q?sh=20from=20local=20home=20directory=20(#245)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/node/src/core/platform/services/storage/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tdrive/backend/node/src/core/platform/services/storage/index.ts b/tdrive/backend/node/src/core/platform/services/storage/index.ts index e4d3049b..0d9d30d9 100644 --- a/tdrive/backend/node/src/core/platform/services/storage/index.ts +++ b/tdrive/backend/node/src/core/platform/services/storage/index.ts @@ -23,7 +23,7 @@ export default class StorageService extends TdriveService implements private encryptionOptions: EncryptionConfiguration; private algorithm = "aes-256-cbc"; - private homeDir = this.configuration.get("local.path", "/tdrive"); + private homeDir = "/tdrive"; api(): StorageAPI { return this; @@ -50,7 +50,8 @@ export default class StorageService extends TdriveService implements }); } else { logger.info("Using 'local' connector for storage."); - if (!this.homeDir) this.homeDir = "/tdrive"; + const defaultHomeDir = this.configuration.get("local.path"); + if (defaultHomeDir) this.homeDir = `/${defaultHomeDir}`; } logger.info( `Using 'local' connector for storage${