Do not move source if destination is wrong
[?]
Mar 1, 2021, 5:58 PM
PP3E3TRE43L3ASY3APURWXWOZJRW6O2GFQ6QXYHEWXDNDAKGN34QCDependencies
- [2]
Y7YAFMFFFix path prefix striping on Windows. - [3]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [4]
YN63NUZOSanakirja 1.0 - [5]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way
Change contents
- edit in pijul/src/commands/file_operations.rs at line 48
std::fs::rename(&source, &target)?;let target = std::fs::canonicalize(&target)?; - replacement in pijul/src/commands/file_operations.rs at line 49
let source = source.strip_prefix(&repo_path)?;let target = target.strip_prefix(&repo_path)?;debug!("moving {:?} -> {:?}", source, target);txn.move_file(&source.to_string_lossy(), &target.to_string_lossy())?let target = std::fs::canonicalize(&target)?;{let source = source.strip_prefix(&repo_path)?;let target = target.strip_prefix(&repo_path)?;debug!("moving {:?} -> {:?}", source, target);txn.move_file(&source.to_string_lossy(), &target.to_string_lossy())?;}std::fs::rename(&source, &target)?;