This commit is contained in:
Abhinav 2023-04-26 17:20:01 +05:30
parent 125529dc76
commit faf7801746

View file

@ -261,9 +261,9 @@ export async function moveFile(
await fs.rename(sourcePath, destinationPath);
}
export async function deleteFolder(sourcePath: string): Promise<void> {
if (!existsSync(sourcePath)) {
export async function deleteFolder(folderPath: string): Promise<void> {
if (!existsSync(folderPath)) {
return;
}
fs.rmSync(sourcePath, { force: true, recursive: true });
fs.rmSync(folderPath, { force: true, recursive: true });
}