-
Bug
-
Resolution: Fixed
-
22w42a, 22w44a
-
None
-
Windows 11
-
Plausible
-
Resource Packs
-
Normal
-
Platform
If the resourcepacks directory is a symbolic link, no packs are shown in the Resource Packs screen and the game logs an exception:
[Render thread/WARN]: Failed to list packs in [HIDDEN]\resourcepacks java.nio.file.FileAlreadyExistsException: [HIDDEN]\resourcepacks at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:87) ~[?:?] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?] at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?] at sun.nio.fs.WindowsFileSystemProvider.createDirectory(WindowsFileSystemProvider.java:521) ~[?:?] at java.nio.file.Files.createDirectory(Files.java:700) ~[?:?] at java.nio.file.Files.createAndCheckIsDirectory(Files.java:807) ~[?:?] at java.nio.file.Files.createDirectories(Files.java:753) ~[?:?] at ajb.a(SourceFile:45) ~[22w42a.jar:?] at aje.h(SourceFile:38) ~[22w42a.jar:?] at aje.a(SourceFile:31) ~[22w42a.jar:?] at eqs.d(SourceFile:53) ~[22w42a.jar:?] at eqt.y(SourceFile:154) ~[22w42a.jar:?] at eqt.b(SourceFile:118) ~[22w42a.jar:?] at env.n(SourceFile:389) ~[22w42a.jar:?] at env.b(SourceFile:380) ~[22w42a.jar:?] at eih.a(SourceFile:1037) ~[22w42a.jar:?] at enm.c(SourceFile:80) ~[22w42a.jar:?] at ejz.d(SourceFile:43) ~[22w42a.jar:?] at ejs.a(SourceFile:16) ~[22w42a.jar:?] at ejx.a(SourceFile:120) ~[22w42a.jar:?] at ekz.a(SourceFile:27) ~[22w42a.jar:?] at eii.b(SourceFile:94) ~[22w42a.jar:?] at env.a(SourceFile:489) ~[22w42a.jar:?] at eii.a(SourceFile:94) ~[22w42a.jar:?] at eii.c(SourceFile:165) ~[22w42a.jar:?] at bak.execute(SourceFile:103) ~[22w42a.jar:?] at eii.b(SourceFile:165) ~[22w42a.jar:?] at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43) [lwjgl-glfw-3.3.1.jar:build 7] at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.1.jar:build 7] at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474) [lwjgl-glfw-3.3.1.jar:build 7] at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:222) [22w42a.jar:?] at eih.f(SourceFile:1210) [22w42a.jar:?] at eih.e(SourceFile:776) [22w42a.jar:?] at net.minecraft.client.main.Main.a(SourceFile:244) [22w42a.jar:?] at net.minecraft.client.main.Main.main(SourceFile:51) [22w42a.jar:?]
That's not an issue in 1.19.2.
How to reproduce:
- On Windows, create a folder named "rps" in the game directory.
- Create a symbolic link using mklink /d "C:\PATH\TO\GAMEDIR\resourcepacks" "C:\PATH\TO\GAMEDIR\rps" as
administrator. - Launch 22w42a and open the "Select Resource Packs" screen in the game.
Possible solution:
Replace a line in the FolderRepositorySource#loadPacks(Consumer) method from
Files.createDirectories(this.folder);
to
Files.createDirectories(Files.exists(this.folder) ? this.folder.toRealPath() : this.folder);