From f1b569a9ec9605fb3132e2e049a27a2b825b89fa Mon Sep 17 00:00:00 2001 From: leca Date: Fri, 31 Jan 2025 22:29:15 +0300 Subject: [PATCH] fixed removing before moving --- src/controllers/user.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/controllers/user.js b/src/controllers/user.js index 4191d55..391401f 100644 --- a/src/controllers/user.js +++ b/src/controllers/user.js @@ -75,7 +75,6 @@ class UserController { const image = await Jimp.read(tempPath); if (image.bitmap.width != 64 || image.bitmap.height != 64) { - fs.unlinkSync(targetPath); return res.status(400).send('This does not look like a minecraft skin.'); } @@ -98,7 +97,6 @@ class UserController { const image = await Jimp.read(tempPath); if ((image.bitmap.width != 64 || image.bitmap.height != 32) && (image.bitmap.width != 128 || image.bitmap.height != 64)) { - fs.unlinkSync(tempPath); return res.status(400).send('This does not look like a minecraft cape.'); }