parent
2d6f94edd8
commit
675588f780
@ -50,21 +50,28 @@ const getVdiTimestamp = name => {
|
|||||||
const getDeltaBackupNameWithoutExt = name => name.slice(0, -DELTA_BACKUP_EXT_LENGTH)
|
const getDeltaBackupNameWithoutExt = name => name.slice(0, -DELTA_BACKUP_EXT_LENGTH)
|
||||||
const isDeltaBackup = name => endsWith(name, DELTA_BACKUP_EXT)
|
const isDeltaBackup = name => endsWith(name, DELTA_BACKUP_EXT)
|
||||||
|
|
||||||
|
// Checksums have been corrupted between 5.2.6 and 5.2.7.
|
||||||
|
//
|
||||||
|
// For a short period of time, bad checksums will be regenerated
|
||||||
|
// instead of rejected.
|
||||||
|
//
|
||||||
|
// TODO: restore when enough time has passed (a week/a month).
|
||||||
async function checkFileIntegrity (handler, name) {
|
async function checkFileIntegrity (handler, name) {
|
||||||
let stream
|
await handler.refreshChecksum(name)
|
||||||
|
// let stream
|
||||||
try {
|
//
|
||||||
stream = await handler.createReadStream(name, { checksum: true })
|
// try {
|
||||||
} catch (error) {
|
// stream = await handler.createReadStream(name, { checksum: true })
|
||||||
if (error.code === 'ENOENT') {
|
// } catch (error) {
|
||||||
return
|
// if (error.code === 'ENOENT') {
|
||||||
}
|
// return
|
||||||
|
// }
|
||||||
throw error
|
//
|
||||||
}
|
// throw error
|
||||||
|
// }
|
||||||
stream.resume()
|
//
|
||||||
await eventToPromise(stream, 'finish')
|
// stream.resume()
|
||||||
|
// await eventToPromise(stream, 'finish')
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user