mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Sync profiles before updates
This commit is contained in:
parent
925007015f
commit
0894e0b9c3
1 changed files with 7 additions and 4 deletions
|
@ -355,14 +355,17 @@ public void run() {
|
||||||
// Sync updates dir
|
// Sync updates dir
|
||||||
CommonHelper.newThread("Profiles and updates sync", true, () -> {
|
CommonHelper.newThread("Profiles and updates sync", true, () -> {
|
||||||
try {
|
try {
|
||||||
if (!IOHelper.isDir(updatesDir))
|
|
||||||
Files.createDirectory(updatesDir);
|
|
||||||
updatesManager.readUpdatesDir();
|
|
||||||
|
|
||||||
// Sync profiles dir
|
// Sync profiles dir
|
||||||
if (!IOHelper.isDir(profilesDir))
|
if (!IOHelper.isDir(profilesDir))
|
||||||
Files.createDirectory(profilesDir);
|
Files.createDirectory(profilesDir);
|
||||||
syncProfilesDir();
|
syncProfilesDir();
|
||||||
|
|
||||||
|
// Sync updates dir
|
||||||
|
if (!IOHelper.isDir(updatesDir))
|
||||||
|
Files.createDirectory(updatesDir);
|
||||||
|
updatesManager.readUpdatesDir();
|
||||||
|
|
||||||
|
|
||||||
modulesManager.invokeEvent(new LaunchServerProfilesSyncEvent(this));
|
modulesManager.invokeEvent(new LaunchServerProfilesSyncEvent(this));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Updates/Profiles not synced", e);
|
logger.error("Updates/Profiles not synced", e);
|
||||||
|
|
Loading…
Reference in a new issue