file select

This commit is contained in:
cast1e
2024-10-13 19:05:55 +08:00
parent ac40bee45e
commit dc5d53a953
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ async fn new_wallpaper(info:AddInfo) -> String{
let base_url = String::from("./resource");
let current_time:i64 = Local::now().timestamp();
let folder = format!("{}/{}",base_url,current_time);
if fs::create_dir(Path::new(&folder)).is_err(){
if fs::create_dir_all(Path::new(&folder)).is_err(){
return String::from("Error creating folder.");
}
if let Ok(false) = fs::exists(Path::new(&info.preview)){