Description
Line 39 in f42493f
I'm trying to test some code where I deal with absolute paths - mainly because of how often os.Getwd()
gets called directly or indirectly. Using testing/fstest.MapFS
didn't work for me because of the call to fs.ValidPath
which validates paths don't start with "/". Given how insecure it already is I've never understood why (maybe originally they thought it secure?), but why does afero repeat that for IOFS
?
I'm trying to reduce dependencies and would rather not take a dependency on afero for more than testing. While that won't reduce fetch times, it should reduce compile times.
Could we have an IOFS
that does not validate paths? Maybe a new constructor that lets us turn off the validation but keeps everything in place otherwise? I'd be happy to submit a PR if you're open to such a change.