mirror of
https://github.com/edu4rdshl/rusnapshot.git
synced 2026-07-17 23:24:55 +00:00
Append / to dest_dir and source_dir if no specified.
This commit is contained in:
parent
d17690f960
commit
a7536ef65a
1 changed files with 7 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue