Skip to content

Commit

Permalink
Merge pull request #1107 from stgraber/main
Browse files Browse the repository at this point in the history
incusd/storage: Fix UsedBy values for sub-directory volumes
  • Loading branch information
hallyn authored Aug 12, 2024
2 parents 2dccecb + 1b6d5d9 commit e6365b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/server/storage/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ func VolumeUsedByProfileDevices(s *state.State, poolName string, projectName str
continue
}

if dev["source"] == vol.Name {
if strings.Split(dev["source"], "/")[0] == vol.Name {
usedByDevices = append(usedByDevices, name)
}
}
Expand Down Expand Up @@ -937,7 +937,7 @@ func VolumeUsedByInstanceDevices(s *state.State, poolName string, projectName st
continue
}

if dev["source"] == vol.Name {
if strings.Split(dev["source"], "/")[0] == vol.Name {
usedByDevices = append(usedByDevices, devName)
}
}
Expand Down

0 comments on commit e6365b4

Please sign in to comment.