Skip to content

Commit

Permalink
feat(vhd-lib): handle broken vhd directory named as aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Feb 28, 2025
1 parent 2e21211 commit af2f292
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/vhd-lib/Vhd/VhdAbstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,15 @@ exports.VhdAbstract = class VhdAbstract {
}

static async unlink(handler, path) {
const resolved = await resolveVhdAlias(handler, path)
let resolved = path
try {
resolved = await resolveVhdAlias(handler, path)
} catch (err) {
// broken vhd directory must be unlinkable
if (err.code !== 'EISDIR') {
throw err
}
}
try {
await handler.unlink(resolved)
} catch (err) {
Expand Down

0 comments on commit af2f292

Please sign in to comment.