ksud: Add some logs

This commit is contained in:
weishu
2024-02-29 22:40:42 +08:00
parent 8c0d06bc68
commit 6de330b00a
2 changed files with 11 additions and 11 deletions

View File

@@ -260,8 +260,11 @@ fn copy_xattrs(src_path: impl AsRef<Path>, dest_path: impl AsRef<Path>) -> Resul
xattr.to_string_lossy(),
value.to_string_lossy(),
);
extattr::lsetxattr(dest_path.as_ref(), &xattr, &value, extattr::Flags::empty())
.with_context(|| format!("Failed to set xattr for {:?}", dest_path.as_ref()))?;
if let Err(e) =
extattr::lsetxattr(dest_path.as_ref(), &xattr, &value, extattr::Flags::empty())
{
log::warn!("Failed to set xattr: {}", e);
}
}
Ok(())
}