mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
create datadir folder if not exist
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user