mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
create datadir folder if not exist
This commit is contained in:
parent
20f7cc0cf9
commit
ec9030e0ef
1 changed files with 3 additions and 0 deletions
|
@ -272,6 +272,9 @@ static std::string g_data_dir;
|
||||||
void set_data_dir(const std::string &dir)
|
void set_data_dir(const std::string &dir)
|
||||||
{
|
{
|
||||||
g_data_dir = dir;
|
g_data_dir = dir;
|
||||||
|
if (!g_data_dir.empty() && !boost::filesystem::exists(g_data_dir)) {
|
||||||
|
boost::filesystem::create_directory(g_data_dir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& data_dir()
|
const std::string& data_dir()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue