Skip to content

Commit

Permalink
handle root properly in virtual file systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsannm committed Jun 30, 2024
1 parent 21b235d commit 623825a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,8 @@ func (h *fsHandler) pathToFilePath(path string) string {
if len(path) < 1 {
return path
}
return path[1:]

return filepath.Join(h.root, path)
}
return filepath.FromSlash(h.root + path)
}
Expand Down

0 comments on commit 623825a

Please sign in to comment.