unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: 32126@debbugs.gnu.org
Subject: bug#32126: call-with-temporary-directory rarely cleans up after itself
Date: Wed, 11 Jul 2018 14:59:37 -0400	[thread overview]
Message-ID: <20180711185937.GA16510@jasmine.lan> (raw)

[-- 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 --]

             reply	other threads:[~2018-07-11 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 18:59 Leo Famulari [this message]
2018-07-12 15:37 ` bug#32126: call-with-temporary-directory rarely cleans up after itself 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711185937.GA16510@jasmine.lan \
    --to=leo@famulari.name \
    --cc=32126@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).