vasi / qcow2-fuse

Gain access to qcow2 virtual disk images as a user-space filesystem
MIT License
60 stars 5 forks source link

Update opts.rs #3

Closed ybart closed 5 years ago

ybart commented 5 years ago

Fix the following panic:

$ RUST_BACKTRACE=1 $HOME/.cargo/bin/qcow2-fuse -h
thread 'main' panicked at 'the long_name (second argument) should be longer than a single character, or an empty string for none', /Users/ybart/.cargo/registry/src/github.com-1ecc6299db9ec823/getopts-0.2.18/src/lib.rs:551:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic
   6: getopts::Options::optmulti
   7: qcow2_fuse::opts::Options::new
   8: qcow2_fuse::main
   9: std::rt::lang_start::{{closure}}
  10: std::panicking::try::do_call
  11: __rust_maybe_catch_panic
  12: std::rt::lang_start_internal
  13: main
ybart commented 5 years ago

Here is a workaround to use the tool while this PR is open:

$ git clone git@github.com:ybart/qcow2-fuse.git
$ cd qcow2-fuse
$ cargo build
$ target/debug/qcow2-fuse -h