This commit is contained in:
Michael Zhang 2020-03-04 00:19:31 -06:00
parent cf26ffedb1
commit d154536f6e
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -54,6 +54,7 @@ pub fn restore(options: RestoreOptions) -> Result<()> {
Ok(i) if i < files.len() => { Ok(i) if i < files.len() => {
let info = files.get(i).unwrap(); let info = files.get(i).unwrap();
eprintln!("moving {:?} to {:?}", &info.deleted_path, &info.path); eprintln!("moving {:?} to {:?}", &info.deleted_path, &info.path);
fs::remove_file(&info.info_path)?;
fs::rename(&info.deleted_path, &info.path)?; fs::rename(&info.deleted_path, &info.path)?;
} }
_ => eprintln!("Invalid number."), _ => eprintln!("Invalid number."),