~ chicken-core (chicken-5) 027db3f4e29245d481b2855e7d3e0d819db26506


commit 027db3f4e29245d481b2855e7d3e0d819db26506
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Jul 9 11:48:28 2010 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Jul 9 11:48:28 2010 +0200

    bugfix in create-directory; doc'd #f version to standard-extension

diff --git a/manual/Extensions b/manual/Extensions
index a9b78b16..e1aa4906 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -176,6 +176,10 @@ a simple single-file extension. This is roughly equivalent to:
      ... `INFO' ...
      (static "ID.o")))   ; if `static' is given and true
 
+{{VERSION}} may be {{#f}}, in that case the version obtained from where the
+extension has been retrieved wil be taken. If installed directly from a local
+directory, the version will default to {{"unknown"}}.
+
 
 ==== run
 
diff --git a/posixunix.scm b/posixunix.scm
index 773f5d57..49213e6c 100644
--- a/posixunix.scm
+++ b/posixunix.scm
@@ -751,11 +751,12 @@ EOF
     (lambda (name #!optional parents?)
       (##sys#check-string name 'create-directory)
       (let ((name (##sys#expand-home-path name)))
-        (unless (or (fx= 0 (##sys#size name)) (directory? 'create-directory name))
+        (unless (or (fx= 0 (##sys#size name))
+		    (file-exists? name))
           (if parents?
               (let loop ((dir (let-values (((dir file ext) (decompose-pathname name)))
                                 (if file (make-pathname dir file ext) dir))))
-                (when (and dir (not (directory? 'create-directory dir)))
+                (when (and dir (not (directory? dir)))
                   (loop (pathname-directory dir))
                   (*create-directory 'create-directory dir)) )
               (*create-directory 'create-directory name) ) )
Trap