Skip to content

Commit

Permalink
Improve empty directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
altugbakan committed Jun 11, 2024
1 parent 52a6cf3 commit 1db6805
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ impl Config {
}
}

if config.receive_directory == PathBuf::new() {
if config.receive_directory.as_os_str().is_empty() {
config.receive_directory.clone_from(&config.directory);
}
if config.send_directory == PathBuf::new() {
if config.send_directory.as_os_str().is_empty() {
config.send_directory.clone_from(&config.directory);
}

Expand Down

0 comments on commit 1db6805

Please sign in to comment.