mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-15 20:05:55 +08:00
create datadir folder if not exist
This commit is contained in:
parent
781b187e40
commit
a5f1bf7fa8
@ -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…
x
Reference in New Issue
Block a user