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