fix(download dir): fix logic error in detecting dir
This commit is contained in:
parent
6a38ea306b
commit
04368ff549
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ pub fn add_new_download_dir(new_dir: String) -> Result<(), String> {
|
|||
let metadata = new_dir_path
|
||||
.metadata()
|
||||
.map_err(|e| format!("Unable to access file or directory: {}", e.to_string()))?;
|
||||
if metadata.is_dir() {
|
||||
if !metadata.is_dir() {
|
||||
return Err("Invalid path: not a directory".to_string());
|
||||
}
|
||||
let dir_contents = new_dir_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue