mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-25 02:00:21 +08:00
🐛 Fix(custom): fix file delete bug
This commit is contained in:
@@ -141,7 +141,7 @@ class Uploader {
|
||||
logger.error(e)
|
||||
return false
|
||||
} finally {
|
||||
if (imgPath) {
|
||||
if (imgPath && imgPath.startsWith(path.join(picgo.baseDir, CLIPBOARD_IMAGE_FOLDER))) {
|
||||
fs.remove(imgPath)
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class Uploader {
|
||||
logger.error(e)
|
||||
return false
|
||||
} finally {
|
||||
if (imgPath) {
|
||||
if (imgPath && imgPath.startsWith(path.join(picgo.baseDir, CLIPBOARD_IMAGE_FOLDER))) {
|
||||
fs.remove(imgPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user