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:
+1
-1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user