Skip to content

Commit

Permalink
Mount temporary files as READ_ONLY
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIIL committed May 29, 2024
1 parent ec90a26 commit f1b1190
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import net.fabricmc.tinyremapper.TinyUtils;

import org.objectweb.asm.commons.Remapper;
import org.quiltmc.loader.api.MountOption;
import org.quiltmc.loader.api.plugin.solver.ModLoadOption;
import org.quiltmc.loader.impl.filesystem.QuiltUnifiedFileSystem;
import org.quiltmc.loader.impl.launch.common.QuiltLauncher;
Expand Down Expand Up @@ -105,7 +106,7 @@ public static void remap(TransformCache cache) {
Files.walk(mod.resourceRoot()).filter(p -> p.getFileName().toString().endsWith(".class")).forEach(p -> {
try {
Files.createDirectories(in.resolve(p.getParent().toAbsolutePath().toString()));
fs.mount(p, in.resolve(p.toAbsolutePath().toString()));
fs.mount(p, in.resolve(p.toAbsolutePath().toString()), MountOption.READ_ONLY);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Expand Down

0 comments on commit f1b1190

Please sign in to comment.