WeBWorK: overwrite prior image files when unpacking an archive - #3078
Merged
Conversation
Collaborator
Author
|
Looking for confirmation on a Windows machine.... |
Collaborator
Author
Contributor
|
I applied the change manually on my Windows computer, and got a clean run, with all the images where they're supposed to be. This seems to resolve the issue! |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rbeezer
force-pushed
the
webwork-image-replace
branch
from
July 28, 2026 02:46
25f8eb2 to
5288bf9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerating WeBWorK representations on Windows fails to update TikZ images, reported on pretext-support: each downloaded
.tgzimage archive extracts correctly, but the subsequentos.renameofimage.tex/image.pdf/image.svg/image.pngto the problem's image name raisesFileExistsErroron Windows whenever a prior run's file is present (POSIX replaces silently). The bareexceptthen reports the failure as "did not contain a ... file" — for every problem and every format — and the archive is discarded, leaving stale images.os.replace()has the same signature and silently overwrites the destination on all platforms, so a Linux run is unchanged and a Windows run now overwrites prior generated images, matching Linux. In passing, the warning-message template moves adjacent to its single use.Verified on Linux with the WeBWorK sample chapter against
webwork-ptx.aimath.org: before/after runs produce identical image inventories, byte-identical representation files and.tex/.svgimages, and pixel-identical.pdf/.pngimages (byte differences are per-request server rendering); regenerating into an already-populated images directory completes with no warnings.Claude Fable 5, acting as a coding assistant for Rob Beezer