You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filepath.Clean will have the last / removed, leaving the Name() containing a / prefix.
Next time the BasePathFile trimming a prefix, it trims nothing: strings.TrimPrefix(`/123/afero-test-388191401`, `123`).
It seems that
BasePathFile.Name()
method returns wrongly trimmed path:afero/basepath.go
Line 37 in 5c4385a
filepath.Clean
will have the last/
removed, leaving theName()
containing a/
prefix.Next time the BasePathFile trimming a prefix, it trims nothing:
strings.TrimPrefix(`/123/afero-test-388191401`, `123`)
.The code above will panic:
Update:
Chaning
fs2
to befs2 := afero.NewBasePathFs(fs1, `/123`)
seems to work, but it's somewhat inconsistent.The text was updated successfully, but these errors were encountered: