Skip to content

Commit c3a1d65

Browse files
authored
Merge pull request #1834 from stgraber/main
incusd/instance/lxc: Cleanup OCI mount paths
2 parents 15af91a + 362e447 commit c3a1d65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/server/instance/drivers/driver_lxc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2378,7 +2378,7 @@ func (d *lxc) startCommon() (string, []func() error, error) {
23782378
continue
23792379
}
23802380

2381-
lxcMounts = append(lxcMounts, fmt.Sprintf("/%s", fields[1]))
2381+
lxcMounts = append(lxcMounts, filepath.Clean(fmt.Sprintf("/%s", fields[1])))
23822382
}
23832383

23842384
// Configure mounts.
@@ -2389,7 +2389,7 @@ func (d *lxc) startCommon() (string, []func() error, error) {
23892389
}
23902390

23912391
// Skip all our own mounts.
2392-
if slices.Contains(lxcMounts, mount.Destination) {
2392+
if slices.Contains(lxcMounts, filepath.Clean(mount.Destination)) {
23932393
continue
23942394
}
23952395

0 commit comments

Comments
 (0)