mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Fix mv build on Windows
This commit is contained in:
parent
4f5e8f4566
commit
d55e2ee80a
2 changed files with 2 additions and 6 deletions
|
@ -9,10 +9,7 @@ path = "mv.rs"
|
|||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "mv"
|
||||
|
|
|
@ -17,7 +17,6 @@ extern crate uucore;
|
|||
use std::fs;
|
||||
use std::env;
|
||||
use std::io::{BufRead, BufReader, Result, stdin, Write};
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
static NAME: &'static str = "mv";
|
||||
|
@ -319,7 +318,7 @@ fn rename(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> Result<()> {
|
|||
}
|
||||
|
||||
if b.update {
|
||||
if try!(fs::metadata(from)).mtime() <= try!(fs::metadata(to)).mtime() {
|
||||
if try!(try!(fs::metadata(from)).modified()) <= try!(try!(fs::metadata(to)).modified()) {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue