Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ quick-xml = "0.42"
percent-encoding = "2.3"
# Write transaction: extended attributes copied through the atomic rename, fsync fallback,
# free space and no-replace rename (rustix, fs only), ACL detection on macOS (exacl).
xattr = "1.6"
rustix = { version = "1.1", features = ["fs", "process"] }
xattr = "1.7"
rustix = { version = "1.1.6", features = ["fs", "process"] }
exacl = "0.13"
# Local date of the backup folders (time zone from the system); MIT OR Unlicense, used under MIT.
jiff = { version = "0.2", default-features = false, features = ["std", "tz-system", "tzdb-zoneinfo"] }
Expand Down
3 changes: 2 additions & 1 deletion crates/sc-io/src/txn/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ pub(crate) fn read_xattr(path: &Path, name: &OsStr) -> std::io::Result<Option<Ve
use rustix::io::Errno;
// The size can grow between the two calls; try again a few times.
for _ in 0..4 {
let size = match rustix::fs::lgetxattr(path, name, &mut [0_u8; 0][..]) {
// The size query: an empty buffer is not one (since rustix 1.1.6 it reads 0 bytes).
let size = match rustix::fs::lgetxattr_query(path, name) {
Ok(n) => n,
Err(e) if e == NO_ATTR => return Ok(None),
Err(e) => return Err(e.into()),
Expand Down
2 changes: 1 addition & 1 deletion crates/sc-io/tests/resource_fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn listed(p: &Path) -> bool {

/// The size `getxattr(2)` gives the resource fork of `p`.
fn attribute_size(p: &Path) -> usize {
rustix::fs::getxattr(p, RESOURCE_FORK, &mut [0_u8; 0][..]).expect("resource fork attribute")
rustix::fs::getxattr_query(p, RESOURCE_FORK).expect("resource fork attribute")
}

/// A 70,000-byte resource fork (reads of it are cut to the buffer unless sized first).
Expand Down
Loading