♻️Default value for storage home directory doesn't start with '/'

This commit is contained in:
Anton SHEPILOV
2024-10-31 15:09:22 +01:00
committed by Anton Shepilov
parent 6c7dac388f
commit 01744274eb
@@ -38,7 +38,7 @@ export default class StorageService extends TdriveService<StorageAPI> implements
* But for the local storage it's a default value
* @private
*/
private homeDir = "/tdrive";
private homeDir = "tdrive";
constructor(protected options?: TdriveServiceOptions<TdriveServiceConfiguration>) {
super(options);
@@ -277,6 +277,9 @@ export default class StorageService extends TdriveService<StorageAPI> implements
this.logger.error("For S3 connector home directory MUST NOT start with '/'");
throw new Error("For S3 connector home directory MUST NOT start with '/'");
}
} else {
this.logger.info("For 'local' connector setting home directory to '/tdrive'");
this.homeDir = "/tdrive";
}
}
}