summaryrefslogtreecommitdiffstats
path: root/src/launcher/jre.rs
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2025-01-23 15:29:34 -0600
committerLibravatar bigfoot547 <[email protected]>2025-01-23 15:29:34 -0600
commit075bee27ee6f9fe277a9f08e787d2cc607aaebd5 (patch)
treef2fcfae7faa6f0b8c625a23222551fc473a01257 /src/launcher/jre.rs
parentfix neoforge regression (diff)
fix jre cleanup on windows
Diffstat (limited to 'src/launcher/jre.rs')
-rw-r--r--src/launcher/jre.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/launcher/jre.rs b/src/launcher/jre.rs
index a09c8f3..a3cbb27 100644
--- a/src/launcher/jre.rs
+++ b/src/launcher/jre.rs
@@ -110,7 +110,14 @@ impl JavaRuntimeRepository {
continue;
}
- if !rel_path.to_str().is_some_and(|s| manifest.files.get(s)
+ let rel_path_str;
+ if std::path::MAIN_SEPARATOR != '/' {
+ rel_path_str = rel_path.to_str().map(|s| s.replace(std::path::MAIN_SEPARATOR, "/"));
+ } else {
+ rel_path_str = rel_path.to_str().map(String::from);
+ }
+
+ if !rel_path_str.as_ref().is_some_and(|s| manifest.files.get(s)
.is_some_and(|f| (f.is_file() == entry.file_type().is_file())
|| (f.is_directory() == entry.file_type().is_dir())
|| (f.is_link() == entry.file_type().is_symlink()))) {