option to disable profile saving

This commit is contained in:
Moritz Zwerger 2024-08-09 22:17:31 +02:00
parent 2fec0f1df7
commit eb9c261d15
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2023 Moritz Zwerger
* Copyright (C) 2020-2024 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
@ -19,6 +19,7 @@ import de.bixilon.kutil.concurrent.lock.simple.SimpleLock
import de.bixilon.kutil.exception.ExceptionUtil.ignoreAll
import de.bixilon.kutil.latch.SimpleLatch
import de.bixilon.minosoft.config.profile.profiles.Profile
import de.bixilon.minosoft.terminal.RunConfiguration
import de.bixilon.minosoft.util.json.Jackson
import de.bixilon.minosoft.util.logging.Log
import de.bixilon.minosoft.util.logging.LogLevels
@ -108,6 +109,7 @@ object ProfileIOManager {
fun save(storage: FileStorage) {
if (!RunConfiguration.PROFILES_SAVING) return
lock.lock()
save += storage
lock.unlock()

View File

@ -31,6 +31,7 @@ object RunConfiguration {
var DISABLE_RENDERING = false // if true, rendering is disabled
var DISABLE_CURSOR_CATCH = false
var PROFILES_HOT_RELOADING = true
var PROFILES_SAVING = true
var AUTO_CONNECT_TO: String? = null