File tree 1 file changed +4
-3
lines changed
cap-primitives/src/rustix/linux/fs
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
use super :: procfs:: set_times_through_proc_self_fd;
5
5
use crate :: fs:: { open, OpenOptions , SystemTimeSpec } ;
6
- use fs_set_times:: SetTimes ;
7
6
use std:: path:: Path ;
8
7
use std:: { fs, io} ;
9
8
@@ -17,7 +16,8 @@ pub(crate) fn set_times_impl(
17
16
// access, so first try write.
18
17
match open ( start, path, OpenOptions :: new ( ) . write ( true ) ) {
19
18
Ok ( file) => {
20
- return file. set_times (
19
+ return fs_set_times:: SetTimes :: set_times (
20
+ & file,
21
21
atime. map ( SystemTimeSpec :: into_std) ,
22
22
mtime. map ( SystemTimeSpec :: into_std) ,
23
23
)
@@ -31,7 +31,8 @@ pub(crate) fn set_times_impl(
31
31
// Next try read.
32
32
match open ( start, path, OpenOptions :: new ( ) . read ( true ) ) {
33
33
Ok ( file) => {
34
- return file. set_times (
34
+ return fs_set_times:: SetTimes :: set_times (
35
+ & file,
35
36
atime. map ( SystemTimeSpec :: into_std) ,
36
37
mtime. map ( SystemTimeSpec :: into_std) ,
37
38
)
You can’t perform that action at this time.
0 commit comments