Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexcrichton/ad665856b33acf2bdd0a1e366b1a895c to your computer and use it in GitHub Desktop.
Save alexcrichton/ad665856b33acf2bdd0a1e366b1a895c to your computer and use it in GitHub Desktop.
diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs
index cf406e8dd..77c164671 100644
--- a/src/cargo/sources/path.rs
+++ b/src/cargo/sources/path.rs
@@ -522,6 +522,7 @@ impl<'cfg> Source for PathSource<'cfg> {
fn fingerprint(&self, pkg: &Package) -> CargoResult<String> {
let (max, max_path) = self.last_modified_file(pkg)?;
+ let max_path = max_path.strip_prefix(&self.path).unwrap_or(&max_path);
Ok(format!("{} ({})", max, max_path.display()))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment