Had Enough Items

Had Enough Items

3M Downloads

JEI bookmarks file "rename" fails across filesystems, prevents remaining configs from loading

Exaxxion opened this issue ยท 1 comments

commented

if (!oldBookmarkFile.renameTo(bookmarkFile)) {
Log.get().error("Could not move the old bookmark file from {} to {}", jeiConfigurationDir, "./");
return;
}

The above code block attempts to "rename" a file to move it to a different directory and assign it a different name. This should be done with java.nio.file.Files::move instead, as renameTo fails under a variety of conditions that renders it less portable.

I encountered it in my modpack dev testing instance which utilizes symbolic links to various output directories which cross filesystems.

[18:19:38] [Client thread/ERROR] [Had Enough Items]: Could not move the old bookmark file from /[REDACTED]/.minecraft/config/jei to ./

After encountering this problem, I could not modify any of HEI's configs in game - the config screen was blank:

Image

commented

Fixed in 520cef7, thank you.