Skip to content
Snippets Groups Projects
Verified Commit 4d7f428c authored by nfontrod's avatar nfontrod
Browse files

src/restore.rs: add a restore command

parent 0d22d5a7
Branches
No related tags found
No related merge requests found
use crate::commit;
use crate::pull;
use crate::push;
/// Retore the .borg directory using the folder .tmp/<PROJECT_DIR>_bkp exists
/// Where PROJECT_DIR is the name of the folder at the root of your project
pub fn restore() {
let (borg_folder, _) = commit::check_path();
let borg_folder = borg_folder.canonicalize().unwrap();
let save_dir = pull::get_savefolder(&borg_folder);
push::copy_file(&borg_folder, &save_dir, "file", "pull");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment