Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
ensure_last_os_error()
with libfuse2
Under some conditions, `fuse_mount_compat25` may return -1 to indicate an error but does not set errno. `io::Error::last_os_error()` will then be equivalent to `Err(Success)` which is somewhat surprising. In particular, if the mount options `auto_unmount,allow_{root,other}` are set but the user does not have `user_allow_other` set in their `fuse.conf`, the `fusermount` binary will print an error message to stderr but not set errno. `fusermount3` has the same behaviour, but this issue was mitigated for the libfuse3 binding in #178 by mapping `Err(Success)` to the slightly more useful `Error(Other, "Unspecified Error")`. This commit applies the same fix to the libfuse2 binding.
- Loading branch information