From c2c8cf919ed91821fe218068196aac6edfc1347a Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 30 Sep 2023 16:01:10 -0500 Subject: [PATCH] Fix:Bad backup causing other backup files to not be displayed #1961 --- server/controllers/MeController.js | 2 +- server/managers/BackupManager.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/controllers/MeController.js b/server/controllers/MeController.js index b03868a0..d38c1c4a 100644 --- a/server/controllers/MeController.js +++ b/server/controllers/MeController.js @@ -196,7 +196,7 @@ class MeController { const libraryItem = await Database.libraryItemModel.getOldById(localProgress.libraryItemId) if (!libraryItem) { - Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object no library item`, localProgress) + Logger.error(`[MeController] syncLocalMediaProgress invalid local media progress object no library item with id "${localProgress.libraryItemId}"`, localProgress) continue } diff --git a/server/managers/BackupManager.js b/server/managers/BackupManager.js index 50d6d19c..ef8ed643 100644 --- a/server/managers/BackupManager.js +++ b/server/managers/BackupManager.js @@ -100,7 +100,7 @@ class BackupManager { let entries try { entries = await zip.entries() - } catch(error){ + } catch (error) { // Not a valid zip file Logger.error('[BackupManager] Failed to read backup file - backup might not be a valid .zip file', tempPath, error) return res.status(400).send('Failed to read backup file - backup might not be a valid .zip file') @@ -182,7 +182,6 @@ class BackupManager { data = await zip.entryData('details') } catch (error) { Logger.error(`[BackupManager] Failed to unzip backup "${fullFilePath}"`, error) - await zip.close() continue }