* modules/shepherd/support.scm (mkdir-p): Don't throw errors when
  mkdir fails but the directory exists afterwards.
---
 modules/shepherd/support.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 9bc5f5d..4059770 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -172,7 +172,8 @@ output port, and PROC's result is returned."
                  (mkdir path))
              (loop tail path))
            (lambda args
-             (if (= EEXIST (system-error-errno args))
+             (if (and (file-exists? path)
+                      (eq? (stat:type (stat path)) 'directory))
                  (loop tail path)
                  (apply throw args))))))
       (() #t))))
-- 
2.5.0


Reply via email to