fix: the server's own folders under a short-named temp path are expanded, not refused (#1055)

On Windows the temporary folder often has an 8.3 short name, which the path scope refuses. vfs::long_names spells folders SolidCraft derives from the environment with long names, and the MCP scratch folder and the recovery folder use it, so screenshot without a path and the recovery commands work there again.
This commit is contained in:
NOWN-DEV authored and GitHub committed 2026-10-14 09:05:43 -04:00
1 parent cf93869c4d
commit 08b6a8fe0f
10 files changed
+165 -16

No files matched your search

+3
View File
@@ -56,6 +56,9 @@ file name (alternate data streams), reserved device names with any extension (`N
`COM1.txt`, …) and short 8.3 names (`PROGRA~1`) are refused before any file system call, and the
resolved path is checked again, so a link or junction that leads to a share is refused too. This
includes a `sketch.text` font given as a file path; installed fonts named by family still work.
The server spells its own folders (scratch, recovery) with long names, so they work when the
temporary folder's path has a short name (`…\NAME~1.XYZ\AppData\Local\Temp`, as Windows often
gives when the user folder's name is long).
A refused path is a tool error saying why.
A hard link inside an allowed folder can't be told apart from an ordinary file, so a hard link