fix(net): match natives exclude prefixes on windows

PathBuf renders zip entry paths with the host separator, so prefix
checks against 'META-INF/' never matched and excluded entries were
extracted anyway; normalize separators before matching.
This commit is contained in:
objz committed 2026-08-25 15:30:20 +02:00
1 parent 937e9dac1f
commit 8c94e126c3
1 file changed
+3 -1
+3 -1
View File
@@ -419,7 +419,9 @@ fn extract_natives(jar: &Path, dest: &Path, exclude: &[String]) -> Result<(), Ne
);
continue;
};
let name = rel.to_string_lossy();
// zip entry names use '/', but PathBuf renders them with the host
// separator ('\'), so normalize before matching exclude prefixes.
let name = rel.to_string_lossy().replace('\\', "/");
if exclude.iter().any(|prefix| name.starts_with(prefix)) {
continue;
}