Skip to content

Commit

Permalink
🛠️ Remove trailing slash from local home directory (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
MontaGhanmy authored Nov 7, 2023
1 parent bddd7e3 commit 43dc384
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class StorageService extends TdriveService<StorageAPI> implements

private encryptionOptions: EncryptionConfiguration;
private algorithm = "aes-256-cbc";
private homeDir = this.configuration.get<string>("local.path", "/tdrive");
private homeDir = "/tdrive";

api(): StorageAPI {
return this;
Expand All @@ -50,7 +50,8 @@ export default class StorageService extends TdriveService<StorageAPI> implements
});
} else {
logger.info("Using 'local' connector for storage.");
if (!this.homeDir) this.homeDir = "/tdrive";
const defaultHomeDir = this.configuration.get<string>("local.path");
if (defaultHomeDir) this.homeDir = `/${defaultHomeDir}`;
}
logger.info(
`Using 'local' connector for storage${
Expand Down

0 comments on commit 43dc384

Please sign in to comment.