mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-11-12 17:20:54 +01:00
fix: don't crash if file is not found
This commit is contained in:
1 parent
afe5c50d66
commit
16f27c13bb
1 file changed
+8
-2
+8
-2
@@ -1420,8 +1420,14 @@ const clearJobs = () => {
|
||||
|
||||
for (const job of jobs) {
|
||||
// delete the directories
|
||||
rmSync(`${outputDir}${job.user_id}/${job.id}`, { recursive: true });
|
||||
rmSync(`${uploadsDir}${job.user_id}/${job.id}`, { recursive: true });
|
||||
rmSync(`${outputDir}${job.user_id}/${job.id}`, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
rmSync(`${uploadsDir}${job.user_id}/${job.id}`, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
|
||||
// delete the job
|
||||
db.query("DELETE FROM jobs WHERE id = ?").run(job.id);
|
||||
|
||||
Reference in new issue
Block a user