diff --git a/gradle.properties b/gradle.properties index 89eb4baa6..c7507bf2e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ group = org.quiltmc description = The mod loading component of Quilt url = https://github.com/quiltmc/quilt-loader # Don't forget to change this in QuiltLoaderImpl as well -quilt_loader = 0.20.0-beta.6 +quilt_loader = 0.20.0-beta.7 # Fabric & Quilt Libraries asm = 9.5 diff --git a/src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java b/src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java index b736c76a6..18520a522 100644 --- a/src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java +++ b/src/main/java/org/quiltmc/loader/impl/QuiltLoaderImpl.java @@ -130,7 +130,7 @@ public final class QuiltLoaderImpl { public static final int ASM_VERSION = Opcodes.ASM9; - public static final String VERSION = "0.20.0-beta.6"; + public static final String VERSION = "0.20.0-beta.7"; public static final String MOD_ID = "quilt_loader"; public static final String DEFAULT_MODS_DIR = "mods"; public static final String DEFAULT_CACHE_DIR = ".cache"; diff --git a/src/main/java/org/quiltmc/loader/impl/filesystem/QuiltZipFileSystem.java b/src/main/java/org/quiltmc/loader/impl/filesystem/QuiltZipFileSystem.java index e228df01d..6a7f4493c 100644 --- a/src/main/java/org/quiltmc/loader/impl/filesystem/QuiltZipFileSystem.java +++ b/src/main/java/org/quiltmc/loader/impl/filesystem/QuiltZipFileSystem.java @@ -28,19 +28,14 @@ import java.nio.ByteBuffer; import java.nio.channels.SeekableByteChannel; import java.nio.charset.StandardCharsets; -import java.nio.file.FileStore; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.OpenOption; import java.nio.file.Path; import java.nio.file.StandardOpenOption; -import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.attribute.FileAttributeView; -import java.nio.file.attribute.FileStoreAttributeView; import java.nio.file.spi.FileSystemProvider; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Map; @@ -55,6 +50,7 @@ import org.jetbrains.annotations.Nullable; import org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry.QuiltUnifiedFile; import org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry.QuiltUnifiedFolderReadOnly; +import org.quiltmc.loader.impl.filesystem.QuiltUnifiedEntry.QuiltUnifiedFolderWriteable; import org.quiltmc.loader.impl.util.ExposedByteArrayOutputStream; import org.quiltmc.loader.impl.util.FileUtil; import org.quiltmc.loader.impl.util.LimitedInputStream; @@ -92,6 +88,9 @@ public QuiltZipFileSystem(String name, Path zipFrom, String zipPathPrefix) throw source = new InMemorySource(Files.newInputStream(zipFrom)); } + // Ensure root exists - empty zips wouldn't create this otherwise + addEntryAndParents(new QuiltUnifiedFolderWriteable(root)); + // Check for our header byte[] header = new byte[QuiltZipCustomCompressedWriter.HEADER.length]; try (InputStream fileStream = source.openConstructingStream()) { @@ -122,10 +121,6 @@ public QuiltZipFileSystem(String name, Path zipFrom, String zipPathPrefix) throw QuiltZipFileSystemProvider.PROVIDER.register(this); validate(); dumpEntries(name); - - if (!isDirectory(root)) { - throw new IllegalStateException("Missing root???"); - } } @Override