-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Lines 45 to 49 in 884d7b5
// Cleanup method to delete the temporary directory | |
cleanup() { | |
rmSync(this.path, { recursive: true }); // Replaced rmdirSync with rmSync | |
} | |
} |
Currently the cleanup
method is removing the folder even when it is user-supplied folder and not a temp directory.
The rmSync
should only be called when mkdtempSync
is called, i.e. when this.isTemp == true
;
When users supply their own path, the cleanup
will endup deleting their other data, which is a side-effect and not suggestable.
Metadata
Metadata
Assignees
Labels
No labels