"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
libgit2-sys = "0.6"
log = "0.3"
num_cpus = "1.0"
+same-file = "0.1"
scoped-tls = "0.1"
semver = { version = "0.7.0", features = ["serde"] }
serde = "1.0"
extern crate libc;
extern crate libgit2_sys;
extern crate num_cpus;
+extern crate same_file;
extern crate semver;
extern crate serde;
extern crate serde_ignored;
use std::path::{self, PathBuf};
use std::sync::Arc;
+use same_file::is_same_file;
use serde_json;
use core::{Package, PackageId, PackageSet, Target, Resolve};
destinations.push(dst.display().to_string());
debug!("linking {} to {}", src.display(), dst.display());
+ if is_same_file(src, dst).unwrap_or(false) {
+ continue
+ }
if dst.exists() {
fs::remove_file(&dst).chain_err(|| {
format!("failed to remove: {}", dst.display())