Bug Description
The iofs adapter's Open method validates paths using filepath.Clean, which is OS-specific leading to paths being rejected on windows.
For example, on Windows, filepath.Clean("signature/signature.json") would return signature\signature.json (with backslashes). Since that doesn't match the original forward-slash path, the check name != filepath.Clean(name) fails and returns ErrInvalid.
go-git Version
f70eb2c
Steps to Reproduce
I think the easiest way to repro would be (on a windows box):
- Remove the skip on line39 of iofs_test.go
- Then: go test ./helper/iofs/ -run TestWithFSTest
Additional Information
No response
Bug Description
The iofs adapter's Open method validates paths using
filepath.Clean, which is OS-specific leading to paths being rejected on windows.For example, on Windows,
filepath.Clean("signature/signature.json")would returnsignature\signature.json(with backslashes). Since that doesn't match the original forward-slash path, the check name != filepath.Clean(name) fails and returns ErrInvalid.go-git Version
f70eb2c
Steps to Reproduce
I think the easiest way to repro would be (on a windows box):
Additional Information
No response