mirror of
https://github.com/FabricMC/fabric.git
synced 2025-07-28 15:09:35 -04:00
Fix dev env crash on Windows.
This commit is contained in:
parent
05c818887e
commit
ea2e406d01
2 changed files with 3 additions and 3 deletions
fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader
|
@ -23,11 +23,11 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||
|
||||
import net.minecraft.resource.Resource;
|
||||
|
@ -46,7 +46,7 @@ import net.fabricmc.fabric.mixin.resource.loader.NamespaceResourceManagerAccesso
|
|||
public abstract class GroupResourcePack implements ResourcePack {
|
||||
protected final ResourceType type;
|
||||
protected final List<ModResourcePack> packs;
|
||||
protected final Object2ObjectMap<String, List<ModResourcePack>> namespacedPacks = new Object2ObjectOpenHashMap<>();
|
||||
protected final Map<String, List<ModResourcePack>> namespacedPacks = new Object2ObjectOpenHashMap<>();
|
||||
|
||||
public GroupResourcePack(ResourceType type, List<ModResourcePack> packs) {
|
||||
this.type = type;
|
||||
|
|
|
@ -57,7 +57,7 @@ public final class ModResourcePackUtil {
|
|||
Path path = container.getRootPath();
|
||||
|
||||
if (subPath != null) {
|
||||
Path childPath = path.resolve(subPath.replaceAll("/", path.getFileSystem().getSeparator())).toAbsolutePath().normalize();
|
||||
Path childPath = path.resolve(subPath.replace("/", path.getFileSystem().getSeparator())).toAbsolutePath().normalize();
|
||||
|
||||
if (!childPath.startsWith(path) || !Files.exists(childPath)) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue