ConfigManager: immediately send config after importing local

This commit is contained in:
Max Weber
2020-11-23 00:12:56 -07:00
parent f078717822
commit 4309dcd53e

View File

@@ -313,12 +313,12 @@ public class ConfigManager
migrateConfig(); migrateConfig();
} }
public void importLocal() public Future<Void> importLocal()
{ {
if (session == null) if (session == null)
{ {
// No session, no import // No session, no import
return; return null;
} }
final File file = new File(propertiesFile.getParent(), propertiesFile.getName() + "." + TIME_FORMAT.format(new Date())); final File file = new File(propertiesFile.getParent(), propertiesFile.getName() + "." + TIME_FORMAT.format(new Date()));
@@ -330,10 +330,12 @@ public class ConfigManager
catch (IOException e) catch (IOException e)
{ {
log.warn("Backup failed, skipping import", e); log.warn("Backup failed, skipping import", e);
return; return null;
} }
syncPropertiesFromFile(getLocalPropertiesFile()); syncPropertiesFromFile(getLocalPropertiesFile());
return sendConfig();
} }
private synchronized void loadFromFile() private synchronized void loadFromFile()