[FIX] json расширение вместо conf/cfg

This commit is contained in:
Gravit 2019-06-28 16:27:05 +07:00
parent e556bd70e8
commit b93c7d33eb
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 18 additions and 4 deletions

View file

@ -463,8 +463,22 @@ public LaunchServer(Path dir, boolean testEnv, String[] args) throws IOException
launcherLibraries = dir.resolve("launcher-libraries");
launcherLibrariesCompile = dir.resolve("launcher-libraries-compile");
this.args = Arrays.asList(args);
if(IOHelper.exists(dir.resolve("LaunchServer.conf")))
{
configFile = dir.resolve("LaunchServer.conf");
}
else
{
configFile = dir.resolve("LaunchServer.json");
}
if(IOHelper.exists(dir.resolve("RuntimeLaunchServer.conf")))
{
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.conf");
}
else
{
runtimeConfigFile = dir.resolve("RuntimeLaunchServer.json");
}
publicKeyFile = dir.resolve("public.key");
privateKeyFile = dir.resolve("private.key");
updatesDir = dir.resolve("updates");

View file

@ -58,7 +58,7 @@ public void invoke(String... args) throws IOException, CommandException {
client.setTitle(dirName);
client.setDir(dirName);
try (BufferedWriter writer = IOHelper.newWriter(IOHelper.resolveIncremental(server.profilesDir,
dirName, "cfg"))) {
dirName, "json"))) {
Launcher.gsonManager.configGson.toJson(client, writer);
}