Skip to content

Commit 594c47f

Browse files
committed
Merge 1.18 into 1.19.2
2 parents c4abe1c + 94d5121 commit 594c47f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/resources/PackResourcesCacheEngine.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.embeddedt.modernfix.resources;
22

3+
import com.google.common.base.Joiner;
34
import com.google.common.base.Stopwatch;
45
import com.google.common.collect.ImmutableList;
56
import com.google.common.collect.ImmutableMap;
@@ -28,6 +29,8 @@
2829
* drop.
2930
*/
3031
public class PackResourcesCacheEngine {
32+
private static final Joiner SLASH_JOINER = Joiner.on('/');
33+
3134
private final Map<PackType, Set<String>> namespacesByType;
3235
private final Set<CachedResourcePath> containedPaths;
3336
private final EnumMap<PackType, Map<String, List<CachedResourcePath>>> resourceListings;
@@ -88,7 +91,7 @@ private static boolean isValidCachedResourcePath(Path path) {
8891
if(path.getFileName() == null || path.getNameCount() == 0) {
8992
return false;
9093
}
91-
String str = path.toString();
94+
String str = SLASH_JOINER.join(path);
9295
if(str.length() == 0)
9396
return false;
9497
for(int i = 0; i < str.length(); i++) {

0 commit comments

Comments
 (0)