chore: check file status before deleting cloud files (#2053)

This commit is contained in:
Huang Xin
2025-09-17 10:54:32 +08:00
committed by GitHub
parent 7e062be0d0
commit e0c5acf4c8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ export abstract class BaseAppService implements AppService {
book.coverDownloadedAt = null;
}
}
if (deleteAction === 'cloud' || deleteAction === 'both') {
if ((deleteAction === 'cloud' || deleteAction === 'both') && book.uploadedAt) {
const fps = [getRemoteBookFilename(book), getCoverFilename(book)];
for (const fp of fps) {
console.log('Deleting uploaded file:', fp);