Skip to content

fix panic on extraction#950

Open
curious-rabbit wants to merge 1 commit intoouch-org:mainfrom
curious-rabbit:bugfixes
Open

fix panic on extraction#950
curious-rabbit wants to merge 1 commit intoouch-org:mainfrom
curious-rabbit:bugfixes

Conversation

@curious-rabbit
Copy link
Copy Markdown

A few bugs that cause panics or silently lose info

  • ouch list panics on a corrupt .bz3 file because Bz3Decoder::new is called with .unwrap(). decompress.rs already uses ? for the same call.
  • Tar compression panics if the file walker hits an I/O or permission error mid-walk (entry.unwrap() in archive/tar.rs). Zip and 7z already use ?.
  • 7z extraction silently drops mtime-set errors via .unwrap_or_default(), so users get files with wrong timestamps and no warning.
  • Typo in SUPPORTED_ALIASES: "tzlma" should be "tlzma" (every other place in the codebase uses tlzma).
  • ouch panics at startup if the current directory is unreadable or has been deleted (env::current_dir().expect(...) in main.rs).
  • --threads 0 is handled inconsistently: cli/mod.rs treats it as "auto" but commands/mod.rs still passes it to rayon, and build_global().unwrap() panics if the thread pool is already initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant