mirror of
https://github.com/edu4rdshl/rusnapshot.git
synced 2026-07-18 07:34:48 +00:00
Only add / if the strings aren't empty.
This commit is contained in:
parent
a7536ef65a
commit
48fb307c57
1 changed files with 2 additions and 2 deletions
|
|
@ -3,10 +3,10 @@ use rusnapshot::{args, controller, database, errors::*};
|
|||
fn run() -> Result<()> {
|
||||
let mut arguments = args::get_args();
|
||||
|
||||
if !arguments.source_dir.ends_with('/') {
|
||||
if !arguments.source_dir.is_empty() && !arguments.source_dir.ends_with('/') {
|
||||
arguments.source_dir += "/"
|
||||
}
|
||||
if !arguments.dest_dir.ends_with('/') {
|
||||
if !arguments.dest_dir.is_empty() && !arguments.dest_dir.ends_with('/') {
|
||||
arguments.dest_dir += "/"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue