mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
FIX: add process id to save file name
Change-Id: I359d75ef4f7f63e6f5eb5138f18921faa09593fa
This commit is contained in:
parent
48083f7c0c
commit
f16d2f337e
2 changed files with 4 additions and 1 deletions
|
@ -755,12 +755,14 @@ std::string Model::get_backup_path()
|
|||
{
|
||||
if (backup_path.empty())
|
||||
{
|
||||
auto pid = get_current_pid();
|
||||
boost::filesystem::path parent_path(temporary_dir());
|
||||
std::time_t t = std::time(0);
|
||||
std::tm* now_time = std::localtime(&t);
|
||||
std::stringstream buf;
|
||||
buf << "/bamboo_model/";
|
||||
buf << std::put_time(now_time, "%a_%b_%d/%H_%M_%S#");
|
||||
buf << pid << "#";
|
||||
buf << this->id().id;
|
||||
|
||||
backup_path = parent_path.string() + buf.str();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue