Hello, I am having a strange issue working with the Configurate library in Sponge. Sometimes when trying to save a file, I get an AccessDeniedException. This has never happened before, so I am unsure what has gone wrong. The code used to save the file can be found below:
// Ignore undefined variables, this is a snippet.
ConfigurationLoader<?> manager = HoconConfigurationLoader.builder().setFile(file).build();
manager.save(root);
Basically what @xfel said. It’d probably also be better to add an EconomyLite#getLogger() function, and then put the manager.save(root) into a try-catch block (as shown in docs )
I really don’t know then; maybe your saving it when it’s already open then? Still have no idea how that could happen, but that’s all I can come up with.
I think the issue is that I am saving the same file too many times in too short of a period of time. Since each save is run in an async thread, the file is being saved again before it has finished saving the previous time. Hopefully that all makes sense.