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