Summary
Memoization of directory used by create-temporary-{file,directory}
Metadata
- Id: 918a476494522612e6098cee7a9f0e71d2da1f8e
- Trac id: 1830
- Type: defect
- Reporter: mario
- Owner: mario
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty: easy
- Resolution: fixed
- Priority: minor
- Milestone: someday
- Version: 5.3.0
- Changetime: 2024-01-04 19:17:34 UTC
- Created: 2024-01-02 20:22:40 UTC
- Keywords: create-temporary-file, create-temporary-directory, environment variables, TMPDIR, TMP, TEMP
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).