Misplaced configuration file on non-Windows systems
val-int1 opened this issue ยท 1 comments
The configuration file gets saved as a file named config\forcecrawl.cfg
on non-Windows systems. This is caused by this line which assumes the file separator is a backslash, which (to my knowledge) is a Windows only thing.
This can be fixed by replacing the line with either of these:
// This should still work on Windows systems, but might not on some other systems
public static File configFile = new File(FabricLoader.getInstance().getConfigDir() + "/forcecrawl.cfg");
// This ensures using the correct separator on every system
public static File configFile = new File(FabricLoader.getInstance().getConfigDir() + File.separator + "forcecrawl.cfg");
// This uses the fact FabricLoader#getConfigDir() returns a Path object
public static File configFile = FabricLoader.getInstance().getConfigDir().resolve("forcecrawl.cfg").toFile();
As this does not break the loading/saving of the config, I would understand if it were a low priority issue.