mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: remove user preset folder when logout
Change-Id: I64f0e46de7a91264c3c50188bbad2ac1409bcc0d
This commit is contained in:
parent
346480005a
commit
11c24053dd
3 changed files with 17 additions and 1 deletions
|
@ -722,6 +722,17 @@ void PresetBundle::update_user_presets_directory(const std::string preset_folder
|
|||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" finished");
|
||||
}
|
||||
|
||||
void PresetBundle::remove_user_presets_directory(const std::string preset_folder)
|
||||
{
|
||||
const std::string dir_user_presets = data_dir() + "/" + PRESET_USER_DIR + "/" + preset_folder;
|
||||
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" enter, delete directory : %1%") % dir_user_presets;
|
||||
fs::path folder(dir_user_presets);
|
||||
if (fs::exists(folder)) {
|
||||
fs::remove_all(folder);
|
||||
}
|
||||
}
|
||||
|
||||
void PresetBundle::update_system_preset_setting_ids(std::map<std::string, std::map<std::string, std::string>>& system_presets)
|
||||
{
|
||||
for (auto iterator: system_presets)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue