From: ludo@gnu.org (Ludovic Courtès)
To: David Michael <fedora.dm0@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH shepherd v2] support: Ignore errors in mkdir-p when the directories exist.
Date: Sat, 06 Feb 2016 14:22:26 +0100 [thread overview]
Message-ID: <87lh6yynvx.fsf@gnu.org> (raw)
In-Reply-To: <87oabv3tje.fsf@gmail.com> (David Michael's message of "Fri, 05 Feb 2016 13:23:49 -0500")
David Michael <fedora.dm0@gmail.com> skribis:
> * modules/shepherd/support.scm (mkdir-p): Don't throw errors when
> mkdir fails but the directory exists afterwards.
[...]
> - (if (= EEXIST (system-error-errno args))
> + (if (and (file-exists? path)
> + (eq? (stat:type (stat path)) 'directory))
This systematically does two ‘stat’ calls and can raise an exception if
PATH does not exist.
I’ve adjusted it in commit 66662cf such that on GNU/Linux there’s no
extra ‘stat’.
Thanks!
Ludo’.
prev parent reply other threads:[~2016-02-06 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 18:23 [PATCH shepherd v2] support: Ignore errors in mkdir-p when the directories exist David Michael
2016-02-06 13:22 ` Ludovic Courtès [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lh6yynvx.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=fedora.dm0@gmail.com \
--cc=guix-devel@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.