Skip to content

Don't write to parent dir when rendering problem statement#359

Merged
pehrsoderman merged 2 commits into
Kattis:masterfrom
gkreitz:dont_write_to_parent_dir_when_rendering_statement
Nov 6, 2025
Merged

Don't write to parent dir when rendering problem statement#359
pehrsoderman merged 2 commits into
Kattis:masterfrom
gkreitz:dont_write_to_parent_dir_when_rendering_statement

Conversation

@gkreitz
Copy link
Copy Markdown
Contributor

@gkreitz gkreitz commented Nov 5, 2025

I got bit by this just now, so I decided to fix it. Our archaic setup to render pdf:s prior to this PR involves writing some temporary files (problemset.cls and a .tex file with a random name) to the parent directory of the problem we're installing). This obviously fails badly if the user running problemtools does not have write access above the problem directory.

This PR puts the temporary files in a temporary directory instead. To be able to do so, I had to add a new feature to the cls file, with the new command \problemparentpath{<path>}, which makes the other commands look for problems in that path, rather than in the current directory.

@pehrsoderman pehrsoderman merged commit 56660db into Kattis:master Nov 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants