diff --git a/src/services/fs.ts b/src/services/fs.ts index fdbd73c45..baf05d3fc 100644 --- a/src/services/fs.ts +++ b/src/services/fs.ts @@ -255,7 +255,7 @@ export async function moveFile( // check if destination folder exists const destinationFolder = path.dirname(destinationPath); if (!existsSync(destinationFolder)) { - throw new Error('Destination folder does not exist'); + await fs.mkdir(destinationFolder, { recursive: true }); } await fs.rename(sourcePath, destinationPath); }