Make filesys walk work.

This commit is contained in:
Jeffrey Regan
2019-11-25 16:55:50 -08:00
committed by jregan
parent cb64e19da3
commit c722d4cd17
15 changed files with 1369 additions and 443 deletions

View File

@@ -148,8 +148,7 @@ func demandDirectoryRoot(
}
d, f, err := fSys.CleanedAbs(path)
if err != nil {
return "", fmt.Errorf(
"absolute path error in '%s' : %v", path, err)
return "", err
}
if f != "" {
return "", fmt.Errorf(

View File

@@ -45,7 +45,7 @@ var testCases = []testData{
func MakeFakeFs(td []testData) filesys.FileSystem {
fSys := filesys.MakeFsInMemory()
for _, x := range td {
fSys.WriteFile("/"+x.path, []byte(x.expectedContent))
fSys.WriteFile(x.path, []byte(x.expectedContent))
}
return fSys
}