ids1024 / iso9660-rs

Rust library for reading iso9660 filesystems
Apache License 2.0
22 stars 5 forks source link

fuse_iso example does not work #10

Open inferiorhumanorgans opened 1 year ago

inferiorhumanorgans commented 1 year ago

There are a few issues that prevent it from working. I've updated it so that the basics work from a shell (e.g. cd, ls, cat). I've moved my efforts over to sourcehut for a variety of reasons so I can't open a PR directly.

The source is available here:

https://git.sr.ht/~az1/iso9660-rs/tree/fuse-example/item/examples/iso_fuse.rs

And here's a patchset:

fuse-example.patch

inferiorhumanorgans commented 1 year ago

Here's the patch for the other two examples.

Subject: [PATCH] Bring the other two examples in line with iso_fuse

Hopefully this is all a bit more idiomatic.

- Group related imports into single blocks
- Use clap for argument parsing
- Use anyhow for error handling
- main returns Result<(), anyhow::Error> for human readable error messages
- Use anyhow::bail instead of exit or panic
- Use PathBuf instead of String for paths, the next logical step is to update the iso9660 API to stop
  taking path strings
- Use string interpolation in format strings
- Use std::iter::repeat for string repetition

https://git.sr.ht/~az1/iso9660-rs/commit/b798178dc2f26c65a6aaaa151206e13c996e213d.patch