From 82d6d24a97355072a63a0e10171d2b15c50ed98d Mon Sep 17 00:00:00 2001 From: shutefan Date: Thu, 5 Oct 2017 20:34:08 +0200 Subject: [PATCH] cp: cast st_ino and st_nlink to u64 --- src/cp/cp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cp/cp.rs b/src/cp/cp.rs index 5bedb9718..3e83b26cd 100644 --- a/src/cp/cp.rs +++ b/src/cp/cp.rs @@ -686,8 +686,8 @@ fn preserve_hardlinks(hard_links: &mut Vec<(String, u64)>, source: &std::path::P if libc::lstat(src_path.as_ptr(), &mut stat) < 0 { return Err(format!("cannot stat {:?}: {}", src_path, std::io::Error::last_os_error()).into()); } - inode = stat.st_ino; - nlinks = stat.st_nlink; + inode = stat.st_ino as u64; + nlinks = stat.st_nlink as u64; } #[cfg(windows)] {