afero
afero copied to clipboard
BasePathFs.MkdirAll fail to create from a empty basepath
Lib Version: 1.6.0 Go Version: 1.17
The problem seems to be caused here. The function filepath.clean
will return a dot if empty. The call on the next line will not contains the dot as the same filepath.clean
will remove the dot if non empty.
Then the function will always returns a os.ErrNotExist
, preventing MkdirAll to work.
https://github.com/spf13/afero/blob/master/basepath.go#L47