mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Fix mv build on Windows
This commit is contained in:
+1
-4
@@ -9,10 +9,7 @@ path = "mv.rs"
|
||||
|
||||
[dependencies]
|
||||
getopts = "*"
|
||||
|
||||
[dependencies.uucore]
|
||||
path = "../uucore"
|
||||
default-features = false
|
||||
uucore = { path="../uucore" }
|
||||
|
||||
[[bin]]
|
||||
name = "mv"
|
||||
|
||||
+1
-2
@@ -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(());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user