src/pxar/fuse.rs: enable libfuse debug output in verbose mode

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2019-08-13 15:37:47 +02:00 committed by Dietmar Maurer
parent 742e64ea0b
commit 41d08aa6de
1 changed files with 4 additions and 1 deletions

View File

@ -125,11 +125,14 @@ impl Session {
pub fn new(archive_path: &Path, options: &OsStr, verbose: bool)-> Result<Self, Error> { pub fn new(archive_path: &Path, options: &OsStr, verbose: bool)-> Result<Self, Error> {
let file = File::open(archive_path)?; let file = File::open(archive_path)?;
// First argument should be the executable name // First argument should be the executable name
let arguments = vec![ let mut arguments = vec![
CString::new("pxar-mount").unwrap(), CString::new("pxar-mount").unwrap(),
CString::new("-o").unwrap(), CString::new("-o").unwrap(),
CString::new(options.as_bytes())?, CString::new(options.as_bytes())?,
]; ];
if verbose {
arguments.push(CString::new("--debug").unwrap());
}
let arg_ptrs: Vec<_> = arguments.iter().map(|opt| opt.as_ptr()).collect(); let arg_ptrs: Vec<_> = arguments.iter().map(|opt| opt.as_ptr()).collect();
let args = FuseArgs { let args = FuseArgs {