Automation: errors name a path outside the read roots by its file name

Under --automation-read-root, an error about a file or folder the client
did not give now names it whole only when it is inside the read roots.
Outside them it names the file or folder by its file name, or as "a file
or folder outside the read roots" when it has none, and keeps the roots
and the reason. A path the client gives stays whole.

This covers a save without a path (the document's own file and the files
written beside it, also inside action.batch, and the refusal to write
over a file read with losses), file.revert, script.listInstalled,
plugin.reload without a path and plugin.list's folder report, and
links.relink with copy (the document's folder, its error when the
document's path has no folder, and the copies in the reply). Export for
Screens' refusal for an export preset's folder uses the same helper.
This commit is contained in:
dotCooCoo
2026-11-12 06:05:56 -08:00
parent 71b889605d
commit baa7ada7a1
14 changed files with 342 additions and 55 deletions
+6
View File
@@ -202,6 +202,12 @@ the suite) keep the agent to the folders you give it:
`outside the write roots /work/project/out, /tmp/scratch: …`) or
`automation filesystem access is not granted: write authority is absent: /work/project/out/x.png`.
Links in an opened document that point outside the read roots show as missing.
- An error names a path the client gave as given. A path the client did not give (the document's own file
in a save without `path` and in `file.revert`, also inside `action.batch`, an export preset's folder, the
Scripts folder, the Additional Plug-ins Folder, the document's folder in `links.relink {copy}`) is named
whole only inside the read roots; outside them the error names it by its file name, or as
`a file or folder outside the read roots` when it has none, and keeps the roots and the reason, for example
`automation path rejected: outside the write root /work/project/out: poster.vectorcraft`.
- The preferences that move folders the app reads or writes on its own (`fontsFolder`,
`pluginsFolder`, `recoveryFolder`, `templatesFolder`) can only be set inside the roots. The app's own folders
(preferences, Data Recovery, the User Defined library folders, VectorCraft's Fonts folder) are not