From 83d25c0c70984b58f0e3611dcce665681c700c08 Mon Sep 17 00:00:00 2001 From: shutefan Date: Wed, 4 Oct 2017 23:17:11 +0200 Subject: [PATCH] cp: cast nNumberOfLinks to u64 --- src/cp/cp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cp/cp.rs b/src/cp/cp.rs index a995c7bbd..5bedb9718 100644 --- a/src/cp/cp.rs +++ b/src/cp/cp.rs @@ -701,7 +701,7 @@ fn preserve_hardlinks(hard_links: &mut Vec<(String, u64)>, source: &std::path::P return Err(format!("cannot get file information {:?}: {}", source, std::io::Error::last_os_error()).into()); } inode = (((*stat).nFileIndexHigh as u64) << 32 | (*stat).nFileIndexLow as u64); - nlinks = (*stat).nNumberOfLinks; + nlinks = (*stat).nNumberOfLinks as u64; } for hard_link in hard_links.iter() {