fix/cp ~ update to correct current WinAPI usage (ref #1496)

This commit is contained in:
Roy Ivy III 2020-05-26 13:26:07 -05:00
parent 251905da3d
commit 64f888d364
2 changed files with 5 additions and 8 deletions

View file

@ -31,8 +31,7 @@ walkdir = "2.2.8"
ioctl-sys = "0.5.2"
[target.'cfg(target_os = "windows")'.dependencies]
kernel32-sys = "0.2.2"
winapi = "0.3"
winapi = { version="0.3", features=["fileapi"] }
[target.'cfg(unix)'.dependencies]
xattr="0.2.1"

View file

@ -22,14 +22,12 @@ extern crate walkdir;
#[cfg(unix)]
extern crate xattr;
#[cfg(windows)]
extern crate kernel32;
#[cfg(windows)]
use kernel32::CreateFileW;
#[cfg(windows)]
use kernel32::GetFileInformationByHandle;
#[cfg(windows)]
extern crate winapi;
#[cfg(windows)]
use winapi::um::fileapi::CreateFileW;
#[cfg(windows)]
use winapi::um::fileapi::GetFileInformationByHandle;
use clap::{App, Arg, ArgMatches};
use filetime::FileTime;