dap: file explorer uses the wrong path when looking up mounts

It accidentally retrieved the relative path to the mount directory
instead of the full path which resulted in always returning the root
directory.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
Jonathan A. Sternberg
2025-09-24 09:28:38 -05:00
parent 285dd76b25
commit 92ea5e64b4
+1 -1
View File
@@ -447,7 +447,7 @@ func lookupPath(path string, mounts map[string]gateway.Reference) (remainder str
for p, r := range mounts {
if len(p) > len(prefix) && strings.HasPrefix(path, p) {
prefix = p
remainder, _ = filepath.Rel(prefix, p)
remainder, _ = filepath.Rel(prefix, path)
ref = r
}
}