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:
parent
c0c8a2cda3
commit
342a3ca2ec
1 changed files with 6 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue