fix: multi-user slicing crash on shared temp dir (#14607)

On Linux every account shares /tmp, but slicing builds temp paths there under
fixed, app-owned names via temporary_dir() (model backups, STEP import,
part-skip). The first user to slice creates and owns those dirs, so the next
user cannot write under them and slicing crashes with "No such file or
directory".

Tag the app temp root with the user id at startup (<temp>/orcaslicer_<uid>)
so every temporary_dir() consumer is isolated at once. The id stays at the
top level of the world-writable system temp so each user's dir is created
directly there; a shared parent dir would be owned by whichever user made it
first. The root is pre-created because STEP import writes into it directly.
Windows keeps the plain temp dir since it is already per-user.

Fixes #10108. Same root cause as #5969.
This commit is contained in:
raistlin7447
2026-07-06 09:18:04 +08:00
committed by GitHub
parent 218ec29d74
commit 2860353b9f
5 changed files with 84 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ add_executable(${_TEST_NAME}_tests
test_stl.cpp
test_meshboolean.cpp
test_marchingsquares.cpp
test_utils.cpp
test_timeutils.cpp
test_voronoi.cpp
test_optimizers.cpp