mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
With only --automation-read-root / --automation-write-root set, a path went straight to std::fs::canonicalize, so a UNC, WebDAV or device path (`\host\share\x.pdf`, `\.\pipe\x`) was resolved, contacting the host, before it was refused. `--root` mode already refuses those by name (`foreign_share`). `foreign_share` moves into file_access, and `AutomationRoots::check_path` applies it to the path made absolute (by name, nothing read) before following links, with the same refusal as any other path outside the root. A root on a share still accepts that share. `resolve` is split into `absolute` (empty path, device names, made absolute) and `resolve` (links followed), so `out\NUL` keeps its own refusal. Part of #4003 (the first of its three points).