fix: banner upload panic

This commit is contained in:
trisua 2025-05-05 21:06:47 -04:00
parent 9636f86de1
commit d9234bf656

View file

@ -297,7 +297,9 @@ pub async fn upload_banner_request(
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!(