MaddieM4 / arkive

Immutable archive manipulation tool
GNU General Public License v3.0
0 stars 0 forks source link

File permission bits vary based on UNIX platform #4

Closed MaddieM4 closed 1 month ago

MaddieM4 commented 1 month ago

This'll need some investigation. Here's an example test failure when I try to run the tests on my desktop machine (CachyOS):

---- types::ark::test::test_files stdout ----
thread 'types::ark::test::test_files' panicked at src/types/ark.rs:162:9:
assertion `left == right` failed
  left: Some((IPR("dir1/dir2/nested.txt"), Attrs([Attr("UNIX_MODE", "33188")]), "fixture/dir1/dir2/nested.txt"))
 right: Some((IPR("dir1/dir2/nested.txt"), Attrs([Attr("UNIX_MODE", "33204")]), "fixture/dir1/dir2/nested.txt"))

Putting both into octal for a more useful comparison:

>>> oct(33188)
'0o100644'
>>> oct(33204)
'0o100664'

This is a difference in group-level writeability, where we expect group writeability and don't get it. This will probably be possible to work around while I develop on desktop, but it's very annoying and will probably cause problems for other people.

MaddieM4 commented 1 month ago

Here's the places that need the fix:

failures:
    traits::import::test::import
    traits::import::test::import_files
    traits::read::test::read
    traits::scan::test::scan
    types::ark::test::test_dirs
    types::ark::test::test_files