1
Fork 0
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:
Will Wykeham 2016-11-18 13:58:13 +00:00
parent 4f5e8f4566
commit d55e2ee80a
2 changed files with 2 additions and 6 deletions

View file

@ -9,10 +9,7 @@ path = "mv.rs"
[dependencies] [dependencies]
getopts = "*" getopts = "*"
uucore = { path="../uucore" }
[dependencies.uucore]
path = "../uucore"
default-features = false
[[bin]] [[bin]]
name = "mv" name = "mv"

View file

@ -17,7 +17,6 @@ extern crate uucore;
use std::fs; use std::fs;
use std::env; use std::env;
use std::io::{BufRead, BufReader, Result, stdin, Write}; use std::io::{BufRead, BufReader, Result, stdin, Write};
use std::os::unix::fs::MetadataExt;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
static NAME: &'static str = "mv"; static NAME: &'static str = "mv";
@ -319,7 +318,7 @@ fn rename(from: &PathBuf, to: &PathBuf, b: &Behaviour) -> Result<()> {
} }
if b.update { 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(()); return Ok(());
} }
} }