diff --git a/build_system/prepare.rs b/build_system/prepare.rs index 16e7a4bafae..c68968b4fde 100644 --- a/build_system/prepare.rs +++ b/build_system/prepare.rs @@ -143,6 +143,7 @@ pub(crate) fn fetch(&self, dirs: &Dirs) { RelPath::PATCHES.to_path(dirs).join(format!("{}-lock.toml", self.patch_name)); let target_lockfile = download_dir.join("Cargo.lock"); if source_lockfile.exists() { + assert!(!target_lockfile.exists()); fs::copy(source_lockfile, target_lockfile).unwrap(); } else { assert!(target_lockfile.exists());