haskell-nix / hnix-store

Haskell implementation of the Nix store
Apache License 2.0
85 stars 23 forks source link

[#198] Another fix of compatibility with nix store #203

Closed s-and-witch closed 1 year ago

s-and-witch commented 1 year ago

There were two issues, where hnix-store behaves different from nix-store:

1) narIsDir can throw error in case if the file to which it applies is a self-symlink like ln -s foo foo 2) If hnix-store have to work with non-ASCII file name, it generated corrupted archives due to issues with Data.ByteString.Char8.pack

MREs (look at this https://github.com/haskell-nix/hnix-store/issues/198#issuecomment-1355164581 comment for instructions how to reproduce):

1)

mkdir test
cd test
ln -s foo foo

2)

mkdir test
echo "foo" > test/∀test

Unfortunately, I can't make test cases for these bugs because the first requires test on the real FS and I don't know how to test the second one.