caching png files

This commit is contained in:
KeksNino
2025-03-15 12:41:06 +01:00
parent 6b7b6c436f
commit 7c848716ef
+7 -1
View File
@@ -61,10 +61,16 @@ fn build_ui(app: &Application) {
container.append(&image);
let dest_path =
Path::new("/home/user.cache/LinuxWEGUI/").join(path.file_name().unwrap());
Path::new("/home/user/.cache/LinuxWEGUI/").join(path.file_name().unwrap());
if let Some(parent_dir) = dest_path.parent() {
fs::create_dir_all(parent_dir).expect("Failed to create parent directory");
}
fs::copy(path, dest_path).expect("yeet");
// fs::copy(path, dest_path).expect("yeet");
// fs::copy(path, "/home/user.cache/LinuxWEGUI/").expect("yeet");
}
}