fix: banner upload panic
This commit is contained in:
parent
9636f86de1
commit
d9234bf656
1 changed files with 3 additions and 1 deletions
|
@ -297,7 +297,9 @@ pub async fn upload_banner_request(
|
||||||
auth_user.settings.banner_mime.replace("image/", "")
|
auth_user.settings.banner_mime.replace("image/", "")
|
||||||
);
|
);
|
||||||
|
|
||||||
std::fs::remove_file(path).unwrap();
|
if std::fs::exists(&path).unwrap() {
|
||||||
|
std::fs::remove_file(path).unwrap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = pathd!(
|
let path = pathd!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue