Opened 4 months ago

Closed 4 months ago

#1830 closed defect (fixed)

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

Reported by: Mario Domenech Goulart Owned by: Mario Domenech Goulart
Priority: minor Milestone: someday
Component: core libraries Version: 5.3.0
Keywords: create-temporary-file, create-temporary-directory, environment variables, TMPDIR, TMP, TEMP Cc:
Estimated difficulty: easy

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.

Change History (1)

comment:1 Changed 4 months ago by Mario Domenech Goulart

Resolution: fixed
Status: assignedclosed

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).

Note: See TracTickets for help on using tickets.