rust-embed v8.11.0
git clone https://git.pyrossh.dev/rust-embed
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
78ded35
— zvolin
2025-10-31T17:54:12+01:00
Ignore paths that couldn't be canonicalized
- utils/src/lib.rs +1 -1
utils/src/lib.rs
CHANGED
|
@@ -22,7 +22,7 @@ pub fn get_files(folder_path: String, matcher: PathMatcher) -> impl Iterator<Ite
|
|
|
22
22
|
.filter(|e| e.file_type().is_file())
|
|
23
23
|
.filter_map(move |e| {
|
|
24
24
|
let rel_path = path_to_str(e.path().strip_prefix(&folder_path).unwrap());
|
|
25
|
-
let full_canonical_path = path_to_str(std::fs::canonicalize(e.path()).
|
|
25
|
+
let full_canonical_path = path_to_str(std::fs::canonicalize(e.path()).ok()?);
|
|
26
26
|
|
|
27
27
|
let rel_path = if std::path::MAIN_SEPARATOR == '\\' {
|
|
28
28
|
rel_path.replace('\\', "/")
|