@@ 67,7 67,10 @@ impl Mover<PathBuf> for Mbsync {
fn dry_rename(&mut self) -> Result<i32, &str> {
while let Some(y) = self.original_files.pop_front() {
let (from, to): (PathBuf, PathBuf) = self.get_rename_pair(y);
- println!("{} -> {}", from.to_str().unwrap(), to.to_str().unwrap());
+ match from.eq(&to) {
+ true => println!("{}: already at desired location. Skipping", from.to_str().unwrap()),
+ false => println!("{} -> {}", from.to_str().unwrap(), to.to_str().unwrap()),
+ };
self.moved = self.moved + 1;
}
Ok(self.moved)