unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32126: call-with-temporary-directory rarely cleans up after itself
@ 2018-07-11 18:59 Leo Famulari
  2018-07-12 15:37 ` Ludovic Courtès
  2018-07-13  0:51 ` Leo Famulari
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Famulari @ 2018-07-11 18:59 UTC (permalink / raw)
  To: 32126

[-- Attachment #1: Type: text/plain, Size: 826 bytes --]

While testing something, I noticed that temporary directories created
with ((guix utils) call-with-temporary-directory) were not being
deleted.

This procedure is documented to delete the directories after execution:

"Call PROC with a name of a temporary directory; close the directory and
delete it when leaving the dynamic extent of this call."

It uses rmdir, which is documented as follows: "Remove the existing
directory named by path. The directory must be empty for this to
succeed." [0]

I think this is a case where one expects the directory to be deleted as
with `rm -rf`, regardless of whether or not it is empty.

Should we alter the call-with-temporary-directory procedure to use
((guix build utils) delete-file-recursively)?

[0]
https://www.gnu.org/software/guile/manual/html_node/File-System.html#index-rmdir

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-13 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-11 18:59 bug#32126: call-with-temporary-directory rarely cleans up after itself Leo Famulari
2018-07-12 15:37 ` Ludovic Courtès
2018-07-13 21:34   ` Leo Famulari
2018-07-13  0:51 ` Leo Famulari
2018-07-13  8:27   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).