pxar: pass full path to callback, let verbose flag list files
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
54aec2fa8b
commit
97bbd1bf9e
@ -40,7 +40,7 @@ impl PxarBackupStream {
|
|||||||
dir: Dir,
|
dir: Dir,
|
||||||
_path: PathBuf,
|
_path: PathBuf,
|
||||||
device_set: Option<HashSet<u64>>,
|
device_set: Option<HashSet<u64>>,
|
||||||
_verbose: bool,
|
verbose: bool,
|
||||||
skip_lost_and_found: bool,
|
skip_lost_and_found: bool,
|
||||||
catalog: Arc<Mutex<CatalogWriter<W>>>,
|
catalog: Arc<Mutex<CatalogWriter<W>>>,
|
||||||
patterns: Vec<MatchEntry>,
|
patterns: Vec<MatchEntry>,
|
||||||
@ -70,7 +70,12 @@ impl PxarBackupStream {
|
|||||||
crate::pxar::Flags::DEFAULT,
|
crate::pxar::Flags::DEFAULT,
|
||||||
device_set,
|
device_set,
|
||||||
skip_lost_and_found,
|
skip_lost_and_found,
|
||||||
|_| Ok(()),
|
|path| {
|
||||||
|
if verbose {
|
||||||
|
println!("{:?}", path);
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
entries_max,
|
entries_max,
|
||||||
Some(&mut *catalog_guard),
|
Some(&mut *catalog_guard),
|
||||||
) {
|
) {
|
||||||
|
@ -235,7 +235,7 @@ impl<'a, 'b> Archiver<'a, 'b> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
(self.callback)(Path::new(OsStr::from_bytes(file_name)))?;
|
(self.callback)(&file_entry.path)?;
|
||||||
self.path = file_entry.path;
|
self.path = file_entry.path;
|
||||||
self.add_entry(encoder, dir_fd, &file_entry.name, &file_entry.stat)
|
self.add_entry(encoder, dir_fd, &file_entry.name, &file_entry.stat)
|
||||||
.map_err(|err| self.wrap_err(err))?;
|
.map_err(|err| self.wrap_err(err))?;
|
||||||
|
Loading…
Reference in New Issue
Block a user