cs & io: fix current-directory
initialization
This commit is contained in:
parent
6d1b287467
commit
06101ffb89
|
@ -462,8 +462,6 @@
|
|||
(include-generated "io.scm")
|
||||
|
||||
;; Initialize:
|
||||
(|#%app| 1/current-directory (current-directory))
|
||||
(|#%app| 1/current-directory-for-user (current-directory))
|
||||
(set-log-system-message! (lambda (level str)
|
||||
(1/log-message (|#%app| 1/current-logger) level str #f)))
|
||||
(set-error-display-eprintf! (lambda (fmt . args)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[current-directory host:current-directory]
|
||||
[path->string host:path->string]))
|
||||
|
||||
(current-directory (find-system-path 'orig-dir))
|
||||
(path->string (current-directory))
|
||||
(set-string->number?! string->number)
|
||||
|
||||
(define-syntax-rule (test expect rhs)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"machine/main.rkt"
|
||||
"run/main.rkt"
|
||||
"port/parameter.rkt"
|
||||
"path/system.rkt"
|
||||
(only-in "host/rktio.rkt"
|
||||
rktio-place-init!)
|
||||
"port/place.rkt")
|
||||
|
@ -56,6 +57,7 @@
|
|||
(sandman-place-init!)
|
||||
(rktio-place-init!)
|
||||
(logger-init!)
|
||||
(init-current-directory!)
|
||||
(init-current-ports! in-fd out-fd err-fd cust plumber))
|
||||
|
||||
(module main racket/base)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"../security/main.rkt"
|
||||
"../file/host.rkt"
|
||||
"path.rkt"
|
||||
"parameter.rkt"
|
||||
"directory-path.rkt")
|
||||
|
||||
(provide find-system-path
|
||||
|
@ -13,7 +14,9 @@
|
|||
set-run-file!
|
||||
set-collects-dir!
|
||||
set-config-dir!
|
||||
set-addon-dir!)
|
||||
set-addon-dir!
|
||||
|
||||
init-current-directory!)
|
||||
|
||||
(define/who (find-system-path key)
|
||||
(begin0
|
||||
|
@ -78,3 +81,9 @@
|
|||
(rktio_free s)
|
||||
(end-atomic)
|
||||
(path bstr (system-path-convention-type))]))
|
||||
|
||||
(define (init-current-directory!)
|
||||
(current-directory orig-dir)
|
||||
(current-directory-for-user orig-dir))
|
||||
|
||||
(void (init-current-directory!))
|
||||
|
|
Loading…
Reference in New Issue
Block a user