fix: try to remove thumbnail only if the file has one
This commit is contained in:
parent
5e219868b0
commit
f2e270d284
|
@ -127,7 +127,7 @@ class Util {
|
|||
const thumbName = ThumbUtil.getFileThumbnail(filename);
|
||||
try {
|
||||
await jetpack.removeAsync(path.join(Util.uploadPath, filename));
|
||||
await ThumbUtil.removeThumbs(thumbName);
|
||||
if (thumbName) await ThumbUtil.removeThumbs(thumbName);
|
||||
|
||||
if (deleteFromDB) {
|
||||
await db
|
||||
|
|
Loading…
Reference in New Issue