chore: pr feedbacks

This commit is contained in:
Nicolas Meienberger 2026-01-29 22:47:21 +01:00
parent 3937c9d4f6
commit 3e805d1223

View file

@ -43,6 +43,8 @@ const mount = async (config: BackendConfig, path: string) => {
const credentialsDir = await fs.mkdtemp(`${os.tmpdir()}/zerobyte-smb-`);
const credentialsPath = `${credentialsDir}/credentials`;
try {
const credentialsLines: string[] = [];
if (config.guest) {
@ -72,7 +74,6 @@ const mount = async (config: BackendConfig, path: string) => {
logger.debug(`Mounting SMB volume ${path}...`);
logger.info(`Executing mount: mount ${args.join(" ")}`);
try {
try {
await executeMount(args);
} catch (error) {
@ -81,7 +82,7 @@ const mount = async (config: BackendConfig, path: string) => {
}
} finally {
await fs.rm(credentialsPath, { force: true });
await fs.rmdir(credentialsDir).catch(() => {});
await fs.rm(credentialsDir, { force: true, recursive: true });
}
logger.info(`SMB volume at ${path} mounted successfully.`);