mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 21:17:46 +00:00
du: fix build
This commit is contained in:
parent
f3fc1b72ff
commit
00af7faee8
1 changed files with 3 additions and 3 deletions
|
@ -325,7 +325,7 @@ Try '{} --help' for more information.", s, program);
|
||||||
false => stat.fstat.unstable.blocks * 512,
|
false => stat.fstat.unstable.blocks * 512,
|
||||||
};
|
};
|
||||||
if matches.opt_present("time") {
|
if matches.opt_present("time") {
|
||||||
let time_str = {
|
let tm = {
|
||||||
let (secs, nsecs) = {
|
let (secs, nsecs) = {
|
||||||
let time = match matches.opt_str("time") {
|
let time = match matches.opt_str("time") {
|
||||||
Some(s) => match s.as_slice() {
|
Some(s) => match s.as_slice() {
|
||||||
|
@ -344,10 +344,10 @@ Try '{} --help' for more information.", s, program);
|
||||||
};
|
};
|
||||||
((time / 1000) as i64, (time % 1000 * 1000000) as i32)
|
((time / 1000) as i64, (time % 1000 * 1000000) as i32)
|
||||||
};
|
};
|
||||||
let time_spec = Timespec::new(secs, nsecs);
|
time::at(Timespec::new(secs, nsecs))
|
||||||
time::at(time_spec).strftime(time_format_str)
|
|
||||||
};
|
};
|
||||||
if !summarize || (summarize && index == len-1) {
|
if !summarize || (summarize && index == len-1) {
|
||||||
|
let time_str = tm.strftime(time_format_str).unwrap();
|
||||||
print!("{}\t{}\t{}{}", convert_size(size), time_str, stat.path.display(), line_separator);
|
print!("{}\t{}\t{}{}", convert_size(size), time_str, stat.path.display(), line_separator);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue