Compare commits

...

1 Commits

Author SHA1 Message Date
Florent Beauchamp
4984d2c5dd fix(vhd-lib): don't throw error when a parent locator is missing 2021-12-02 09:07:15 +01:00
2 changed files with 9 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
- [Delta Backup Restoration] Fix assertion error [Forum #5257](https://xcp-ng.org/forum/topic/5257/problems-building-from-source/16)
- [Delta Backup Restoration] `TypeError: this disposable has already been disposed` [Forum #5257](https://xcp-ng.org/forum/topic/5257/problems-building-from-source/20)
- [Delta Backup Restoration] Fix error `ENOENT: no such file '/xo-vm-backups/../parentLocatorEntryN' with vhd having empty parent locator
### Packages to release

View File

@@ -182,7 +182,14 @@ export class VhdDirectory extends VhdAbstract {
}
async _readParentLocatorData(id) {
return (await this._readChunk('parentLocatorEntry' + id)).buffer
try {
return (await this._readChunk('parentLocatorEntry' + id)).buffer
} catch (e) {
if (e.code === 'ENOENT') {
return Buffer.alloc(0)
}
throw e
}
}
async _writeParentLocatorData(id, data) {