caching png files
This commit is contained in:
+7
-1
@@ -61,10 +61,16 @@ fn build_ui(app: &Application) {
|
|||||||
container.append(&image);
|
container.append(&image);
|
||||||
|
|
||||||
let dest_path =
|
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, dest_path).expect("yeet");
|
||||||
|
|
||||||
// fs::copy(path, "/home/user.cache/LinuxWEGUI/").expect("yeet");
|
// fs::copy(path, "/home/user.cache/LinuxWEGUI/").expect("yeet");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user