lib/fs: Basic with empty root shouldn't point at / (#6483)
This commit is contained in:
@@ -30,6 +30,10 @@ type BasicFilesystem struct {
|
||||
}
|
||||
|
||||
func newBasicFilesystem(root string) *BasicFilesystem {
|
||||
if root == "" {
|
||||
root = "." // Otherwise "" becomes "/" below
|
||||
}
|
||||
|
||||
// The reason it's done like this:
|
||||
// C: -> C:\ -> C:\ (issue that this is trying to fix)
|
||||
// C:\somedir -> C:\somedir\ -> C:\somedir
|
||||
|
||||
Reference in New Issue
Block a user