1
Fork 0
mirror of https://github.com/RGBCube/rgbcube.github.io synced 2025-05-14 05:54:58 +00:00

Ignore dirs in state

This commit is contained in:
RGBCube 2023-12-21 17:01:16 +03:00
parent c0c8a2cda3
commit 342a3ca2ec
No known key found for this signature in database

View file

@ -12,6 +12,7 @@ pub fn router() -> Router {
let tar_contents = embed::bytes!("../../assets.tar");
let mut archive = Archive::new(Cursor::new(tar_contents.as_ref()));
let archive_map: DashMap<String, Vec<u8>> = DashMap::new();
for entry in archive.entries().unwrap() {
@ -19,6 +20,11 @@ pub fn router() -> Router {
let path = String::from_utf8(entry.path_bytes().to_vec()).unwrap();
// Is a directory.
if path.ends_with("/") {
continue;
}
let mut contents = Vec::new();
entry.read_to_end(&mut contents).unwrap();