diff --git a/collects/scribble/html-render.rkt b/collects/scribble/html-render.rkt index d5b0e252f7..58483b1ef3 100644 --- a/collects/scribble/html-render.rkt +++ b/collects/scribble/html-render.rkt @@ -1421,7 +1421,12 @@ [full-path (build-path (path-only (current-output-file)) filename)]) (parameterize ([on-separate-page-ok #f]) - (with-output-to-file full-path #:exists 'truncate/replace + ;; We use 'replace instead of the usual 'truncate/replace + ;; to avoid problems where a filename changes only in case, + ;; in which case some platforms will see the old file + ;; as matching the new name, while others don't. Replacing + ;; the file syncs the case with the current uses. + (with-output-to-file full-path #:exists 'replace (lambda () (render-one-part d ri full-path number))) null)) (parameterize ([on-separate-page-ok #t])