pxar: fix missing subdirectories in catalogs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-06-16 11:04:56 +02:00
parent 4264e52220
commit 9321bbd1f5

View File

@ -486,7 +486,15 @@ impl<'a, 'b> Archiver<'a, 'b> {
}
mode::IFDIR => {
let dir = Dir::from_fd(fd.into_raw_fd())?;
self.add_directory(encoder, dir, c_file_name, &metadata, stat)
if let Some(ref mut catalog) = self.catalog {
catalog.start_directory(c_file_name)?;
}
let result = self.add_directory(encoder, dir, c_file_name, &metadata, stat);
if let Some(ref mut catalog) = self.catalog {
catalog.end_directory()?;
}
result
}
mode::IFSOCK => {
if let Some(ref mut catalog) = self.catalog {