use crate::util::*;
+use cap_std::fs::Dir;
+use cap_tempfile::cap_std;
use ostree::*;
use std::os::unix::io::AsRawFd;
let checksum = test_repo.test_commit("test");
let checkout_dir = tempfile::tempdir().expect("checkout dir");
- let dirfd = openat::Dir::open(checkout_dir.path()).expect("openat");
+ let dir = Dir::open_ambient_dir(checkout_dir.path(), cap_std::ambient_authority()).unwrap();
test_repo
.repo
.checkout_at(
None,
- dirfd.as_raw_fd(),
+ dir.as_raw_fd(),
"test-checkout",
&checksum,
gio::Cancellable::NONE,
let checksum = test_repo.test_commit("test");
let checkout_dir = tempfile::tempdir().expect("checkout dir");
- let dirfd = openat::Dir::open(checkout_dir.path()).expect("openat");
+ let dir = Dir::open_ambient_dir(checkout_dir.path(), cap_std::ambient_authority()).unwrap();
test_repo
.repo
.checkout_at(
Some(&RepoCheckoutAtOptions::default()),
- dirfd.as_raw_fd(),
+ dir.as_raw_fd(),
"test-checkout",
&checksum,
gio::Cancellable::NONE,
let checksum = test_repo.test_commit("test");
let checkout_dir = tempfile::tempdir().expect("checkout dir");
- let dirfd = openat::Dir::open(checkout_dir.path()).expect("openat");
+ let dir = Dir::open_ambient_dir(checkout_dir.path(), cap_std::ambient_authority()).unwrap();
test_repo
.repo
.checkout_at(
devino_to_csum_cache: Some(RepoDevInoCache::new()),
..Default::default()
}),
- dirfd.as_raw_fd(),
+ dir.as_raw_fd(),
"test-checkout",
&checksum,
gio::Cancellable::NONE,
let checksum = test_repo.test_commit("test");
let checkout_dir = tempfile::tempdir().expect("checkout dir");
- let dirfd = openat::Dir::open(checkout_dir.path()).expect("openat");
+ let dir = Dir::open_ambient_dir(checkout_dir.path(), cap_std::ambient_authority()).unwrap();
test_repo
.repo
.checkout_at(
}),
..Default::default()
}),
- dirfd.as_raw_fd(),
+ dir.as_raw_fd(),
"test-checkout",
&checksum,
gio::Cancellable::NONE,