Skip to content

Commit

Permalink
awaiting promise
Browse files Browse the repository at this point in the history
  • Loading branch information
b-Nollet committed Nov 27, 2024
1 parent 6aff36e commit 6744f4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vhd-lib/Vhd/VhdDirectory.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ exports.VhdDirectory = class VhdDirectory extends VhdAbstract {
try {
const blockExists = this.containsBlock(blockId)
if (blockExists) {
initialSize = this._handler.getSizeOnDisk(this._getFullBlockPath(blockId))
initialSize = await this._handler.getSizeOnDisk(this._getFullBlockPath(blockId))
}

await this._handler.rename(childBlockPath, this._getFullBlockPath(blockId))
Expand All @@ -290,7 +290,7 @@ exports.VhdDirectory = class VhdDirectory extends VhdAbstract {
}
}
setBitmap(this.#blockTable, blockId)
return this._handler.getSizeOnDisk(this._getFullBlockPath(blockId)) - initialSize
return (await this._handler.getSizeOnDisk(this._getFullBlockPath(blockId))) - initialSize
}

async writeEntireBlock(block) {
Expand Down

0 comments on commit 6744f4f

Please sign in to comment.