diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 1e283ffd..d3adfbae 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -355,14 +355,17 @@ public void run() { // Sync updates dir CommonHelper.newThread("Profiles and updates sync", true, () -> { try { - if (!IOHelper.isDir(updatesDir)) - Files.createDirectory(updatesDir); - updatesManager.readUpdatesDir(); - // Sync profiles dir if (!IOHelper.isDir(profilesDir)) Files.createDirectory(profilesDir); syncProfilesDir(); + + // Sync updates dir + if (!IOHelper.isDir(updatesDir)) + Files.createDirectory(updatesDir); + updatesManager.readUpdatesDir(); + + modulesManager.invokeEvent(new LaunchServerProfilesSyncEvent(this)); } catch (IOException e) { logger.error("Updates/Profiles not synced", e);