mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-18 00:12:09 +00:00
* fix: isolate calibration temp paths per user The calibration temp files under <temp>/calib were file-scope statics initialized before set_temporary_dir() runs at startup, so they kept using the shared system temp root and missed the per-user isolation added in #14607. On Linux every account shares /tmp, so the first user to calibrate owns /tmp/calib and later users fail to write there, the same cross-user collision #14607 fixed for model backups, STEP import, and part skip. Build the paths lazily from temporary_dir() instead, through a calib_temp_dir() accessor and a calib_temp_file() join helper. The base becomes <temp>/orcaslicer_<uid>/calib on Linux and is unchanged on Windows, where the temp dir is already per user. Also make StoreParams::path a std::string rather than a non-owning const char*. The calibration code had to keep a std::string alive solely to feed that pointer, and the field was uninitialized by default; owning the string removes the lifetime hazard for all three callers and makes the entry guard a reliable empty() check. Confined to the 3mf project exporter (three callers, two internal reads); no on-disk, format, or ABI impact. Follows up on #14607 per @Noisyfox's review suggestion.