fixing little tidbits
This commit is contained in:
parent
b0b7926f95
commit
f26b6fb66a
1 changed files with 11 additions and 11 deletions
|
@ -54,18 +54,18 @@ mod file_helper {
|
||||||
#[qinvokable]
|
#[qinvokable]
|
||||||
pub fn validate(self: Pin<&mut Self>, file: QUrl) -> bool {
|
pub fn validate(self: Pin<&mut Self>, file: QUrl) -> bool {
|
||||||
let file_string = file.to_string();
|
let file_string = file.to_string();
|
||||||
let _file_string = file_string.strip_prefix("file://");
|
let file_string = file_string.strip_prefix("file://");
|
||||||
match _file_string {
|
match file_string {
|
||||||
None => {
|
|
||||||
let _exists =
|
|
||||||
Path::new(&file.to_string()).exists();
|
|
||||||
println!("{file} exists? {_exists}");
|
|
||||||
_exists
|
|
||||||
}
|
|
||||||
Some(file) => {
|
Some(file) => {
|
||||||
let _exists = Path::new(&file).exists();
|
let exists = Path::new(&file).exists();
|
||||||
println!("{file} exists? {_exists}");
|
println!("{file} exists? {exists}");
|
||||||
_exists
|
exists
|
||||||
|
}
|
||||||
|
None => {
|
||||||
|
let exists =
|
||||||
|
Path::new(&file.to_string()).exists();
|
||||||
|
println!("{file} exists? {exists}");
|
||||||
|
exists
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue