Append / to dest_dir and source_dir if no specified.

This commit is contained in:
Edu4rdSHL 2021-04-17 01:55:03 -05:00
parent d17690f960
commit a7536ef65a
No known key found for this signature in database
GPG key ID: 3A574A4009F553E5

View file

@ -3,6 +3,13 @@ use rusnapshot::{args, controller, database, errors::*};
fn run() -> Result<()> {
let mut arguments = args::get_args();
if !arguments.source_dir.ends_with('/') {
arguments.source_dir += "/"
}
if !arguments.dest_dir.ends_with('/') {
arguments.dest_dir += "/"
}
database::setup_initial_database(&arguments.database_connection)?;
if arguments.create_snapshot {