mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-22 14:28:12 -05:00
🐛 Fix(custom): fix file delete bug
This commit is contained in:
parent
3efd2c2dd1
commit
e2e802b30f
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user