Update src/backend/utils/database-file-encryption.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -358,7 +358,7 @@ class DatabaseFileEncryption {
|
|||||||
|
|
||||||
const encryptedData = fs.readFileSync(encryptedPath);
|
const encryptedData = fs.readFileSync(encryptedPath);
|
||||||
|
|
||||||
if (metadata.dataSize && encryptedData.length !== metadata.dataSize) {
|
if (metadata.dataSize !== undefined && encryptedData.length !== metadata.dataSize) {
|
||||||
databaseLogger.error(
|
databaseLogger.error(
|
||||||
"Encrypted file size mismatch - possible corrupted write or mismatched metadata",
|
"Encrypted file size mismatch - possible corrupted write or mismatched metadata",
|
||||||
null,
|
null,
|
||||||
|
|||||||
Reference in New Issue
Block a user