[FIX] Sync profiles before updates

This commit is contained in:
Gravita 2024-07-16 17:11:12 +07:00
parent 925007015f
commit 0894e0b9c3
No known key found for this signature in database
GPG key ID: 543A8F335C9CD633

View file

@ -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);