Preventing possible errors in the deletion process

This commit is contained in:
Sudo Space 2025-04-11 15:51:29 +03:30
parent 9e54100939
commit 684deb7f6d

View file

@ -31,6 +31,7 @@ abstract class Ytdlp {
formats?(): any;
public async clean() {
if (!this._filePath) return;
const downloadedFile = Bun.file(this._filePath);
if (await downloadedFile.exists()) {
await downloadedFile.delete();