Changeset 15758 in project


Ignore:
Timestamp:
09/06/09 20:40:11 (10 years ago)
Author:
Kon Lovett
Message:

Forgot about "sudo" mode with 'create-directory/parents'. 'string-null?' is srfi-13 routine - rplcd w/ '(string=? "" ...)'.

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/posixunix.scm

    r15733 r15758  
    888888
    889889(define create-directory
    890   (lambda (name #!optional parents?)
    891     (##sys#check-string name 'create-directory)
    892     (if (not (string-null? name))
    893         (let ((b (create-directory-check name)))
    894           (if (not b)
    895               (let ((parents
    896                      (or (and parents? (make-parents name))
    897                          '())))
    898                 (for-each create-directory parents)
    899                 (create-directory-helper name))
    900               ))
    901         )))
    902 
     890  (let ((string=? string=?))
     891    (lambda (name #!optional parents?)
     892      (##sys#check-string name 'create-directory)
     893      (if (not (string=? "" name))
     894          (let ((b (create-directory-check name)))
     895            (if (not b)
     896                (let ((parents
     897                       (or (and parents? (make-parents name))
     898                           '())))
     899                  (for-each create-directory parents)
     900                  (create-directory-helper name))
     901                ))
     902          ))))
    903903
    904904(define change-directory
  • chicken/trunk/setup-api.scm

    r15728 r15758  
    422422  (make-parameter (or (get-environment-variable "CHICKEN_INSTALL_PREFIX") #f)))
    423423
    424 (define (create-directory/parents dir)
    425   (when (setup-verbose-mode) (printf "  creating directory `~a'~%~!" dir))
    426   (create-directory dir #t) )
     424(define create-directory/parents
     425  (let ()
     426    (define (verb dir)
     427      (when (setup-verbose-mode) (printf "  creating directory `~a'~%~!" dir)) )
     428    (if *windows*
     429        (lambda (dir)
     430          (verb dir)
     431          (create-directory dir #t) )
     432        (lambda (dir)
     433          (verb dir)
     434          ($system (sprintf "~a -p ~a" *mkdir-command* (shellpath dir) ) ) ) ) ) )
    427435
    428436(define (write-info id files info)
Note: See TracChangeset for help on using the changeset viewer.