Skip to content

Commit 1ef68cf

Browse files
authored
Merge pull request #2648 from bensmrs/escaped-disk-eject
incusd/instance/qemu: Properly parse dashed disk names when detaching
2 parents 9278f95 + de220f6 commit 1ef68cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/server/instance/drivers/driver_qemu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6002,7 +6002,7 @@ func qemuDetachDisk(s *state.State, id int) func(string) error {
60026002

60036003
// Detach a disk from the instance.
60046004
func (d *qemu) detachDisk(name string) error {
6005-
diskName := strings.TrimPrefix(name, qemuDeviceIDPrefix)
6005+
diskName := linux.PathNameDecode(strings.TrimPrefix(name, qemuDeviceIDPrefix))
60066006

60076007
// Load and detach the disk.
60086008
config, ok := d.expandedDevices[diskName]

0 commit comments

Comments
 (0)