mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
merge config from previous versions
This commit is contained in:
parent
c1ec746087
commit
3a7756cb23
@ -18,12 +18,14 @@ pub fn initialize() -> PathBuf {
|
|||||||
std::fs::create_dir_all(&config_directories).unwrap_or_default();
|
std::fs::create_dir_all(&config_directories).unwrap_or_default();
|
||||||
std::fs::File::create(&config_path).unwrap();
|
std::fs::File::create(&config_path).unwrap();
|
||||||
default();
|
default();
|
||||||
|
} else {
|
||||||
|
merge_previous_version();
|
||||||
}
|
}
|
||||||
|
|
||||||
config_path
|
config_path
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn merge_previous_version() -> Option<PathBuf> {
|
fn merge_previous_version() -> Option<PathBuf> {
|
||||||
let config_path: PathBuf = Path::new(&get_user_data_dir().unwrap())
|
let config_path: PathBuf = Path::new(&get_user_data_dir().unwrap())
|
||||||
.join("blue-recorder")
|
.join("blue-recorder")
|
||||||
.join("config.ini");
|
.join("config.ini");
|
||||||
|
@ -21,7 +21,6 @@ fn main() {
|
|||||||
}
|
}
|
||||||
let builder: Builder = Builder::from_file(Path::new("windows/ui.glade"));
|
let builder: Builder = Builder::from_file(Path::new("windows/ui.glade"));
|
||||||
|
|
||||||
config_management::merge_previous_version();
|
|
||||||
config_management::initialize();
|
config_management::initialize();
|
||||||
|
|
||||||
// get Objects from UI
|
// get Objects from UI
|
||||||
|
Loading…
Reference in New Issue
Block a user