Summary

Memoization of directory used by create-temporary-{file,directory}

Metadata

Description

Once create-temporary-file or create-temporary-directory is called, the value that represents the directory where temporary files/directories are created gets cached and modifications to the supported environment variables no longer have the expected effect. Example:

 #;1> (create-temporary-file)
 "/tmp/tempcd92.182728.tmp"
 #;2> (set-environment-variable! "TMPDIR" "/home/mario")
 #;3> (create-temporary-file)
 "/tmp/tempc6c.182728.tmp"

In this example, the second call to (create-temporary-file) (#;3) should have created a temporary file in /home/mario, not /tmp.

Changes and comments

[2024-01-04 19:17:34 UTC] mario changed status from assigned to closed

[2024-01-04 19:17:34 UTC] mario set resolution to fixed

[2024-01-04 19:17:34 UTC] mario wrote:

Patch submitted to chicken-hackers (https://mail.gnu.org/archive/html/chicken-hackers/2024-01/msg00000.html) and merged as 4a41c90296858d6265f867a9f89becc102579b38 (see also 1795d8cd150172967f7fcd4da2cc2edc6ec02a52 and da927043200a62e414cb79b3439337895ea5df8e).