Closed snoyberg closed 5 years ago
@snoyberg TLDR. No objection. :) Now, some time after I worked on tar-conduit, I'll happily argue in favor of files to be tared with paths containing forward slash only. Reason for me switching my mind is that tar isn't really a windows file in the first place, so backward slashes (as path separators) don't really belong there, but in reverse is OK, Windows supports forward slashes just fine.
This is arguably a bug, and easy to fix, just wanted to check in with @lehins first. I discovered this due to a test suite failure in pantry on Windows:
https://ci.appveyor.com/project/snoyberg/stack/build/1.0.5408
What's happening is that pantry assumes (I'd argue correctly) that paths inside a tarball use forward slashes exclusively for denoting path separators. And for the most part, this works without a hitch. However, tar-conduit use
pathSeparator
in a few places, likely most importantly inheaderFilePathBS
. As a result, we end up with a filepath ofsrc/Hackage/Security/Client/Repository/HttpLib\HttpClient.hs
instead ofsrc/Hackage/Security/Client/Repository/HttpLib/HttpClient.hs
.@lehins Any objection to me modifying that function to always use forward slashes, so that file paths generated by this library will be consistent cross OS?