Open jochil opened 2 years ago
I created the linked PR, where the returned error is changed from syscall.EPERM
to os.ErrPermission
. I think this is more idiomatic to the std package
This code creates a permission error under windows... this might helpful to verify
os.Chmod(file, 0400)
err := os.WriteFile(file, []byte("test"), 0400)
assert.True(t, errors.Is(err, os.ErrPermission))
When using the
ReadOnlyFs
filter, the error returned when trying to write to the FS is different on Windows than on Linux or MacOSXHow to reproduce:
while the test is running fine on Linux, on Windows it results in:
Expected behavior
Under windows it already returns an error
operation not permitted
but it is not matching withos.ErrPermission
I think it would be more consistent if this behaves identical on different operating systems