mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 06:26:04 +08:00
handle missing conf file case
This commit is contained in:
parent
2b38153395
commit
ee72ebb988
@ -1920,8 +1920,9 @@ void GUI_App::init_app_config()
|
||||
auto older_data_dir = data_dir_path.parent_path() / "BambuStudio-SoftFever";
|
||||
if(boost::filesystem::exists(older_data_dir)){
|
||||
copy_directory_recursively(older_data_dir,data_dir_path);
|
||||
boost::filesystem::rename(data_dir_path / "BambuStudio.conf", data_dir_path / "OrcaSlicer.conf");
|
||||
boost::filesystem::rename(data_dir_path / "BambuStudio.conf.bak", data_dir_path / "OrcaSlicer.conf.bak");
|
||||
boost::system::error_code ec;
|
||||
boost::filesystem::rename(data_dir_path / "BambuStudio.conf", data_dir_path / "OrcaSlicer.conf", ec);
|
||||
boost::filesystem::rename(data_dir_path / "BambuStudio.conf.bak", data_dir_path / "OrcaSlicer.conf.bak", ec);
|
||||
}
|
||||
else
|
||||
boost::filesystem::create_directory(data_dir_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user