Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upos error 22 on .zfs hidden directory #609
Comments
|
This appears to only happen on FreeBSD (tested on 11.3) |
|
https://github.com/ogham/exa/blob/master/src/fs/dir.rs#L38 This is the exact location of the error. I don't really have any Rust skills to debug what is going on, or how to properly trap the error. If my very basic debugging skills are correct, the read_dir works, .map works (both of them), and it bails on something involving the .collect part. |
|
Can you give the output of |
|
as stated above, this is freebsd, not linux, so there is no strace utility. |
|
We have ktrace, dtrace, and truss, though. Relevant bit:
GNU ls works, but produces a warning from this error. BSD ls appears to swallow it somewhere. If I filter out that error, exa works fine in a let contents = fs::read_dir(&path)?
.map(|result| result.map(|entry|entry.path()))
.filter(|result| result.is_ok() || result.as_ref().unwrap_err().kind() != std::io::ErrorKind::InvalidInput)
.collect::<Result<_,_>>()?;Maybe more generally this code should return the entries it does manage to get and there should be a mechanism to warn about encountered errors, rather than discarding the entire thing. |
root@titanic /mnt/datastore/RAWs/.zfs# exa
".": Invalid argument (os error 22)
root@titanic /mnt/datastore/RAWs/.zfs# /bin/ls
snapshot
the ZFS file system creates a super-hidden (even ls -al wont show it) .zfs folder, but you can still cd into it. once in this folder, exa doesn't work. exa however works in sub-folders of .zfs, such as .zfs/snapshots. ls, as shown above, still works.