mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
signal an error when we can't change-directory in with-directory (issue #850)
This commit is contained in:
parent
7e0b2730f4
commit
f367cb86e2
1 changed files with 3 additions and 1 deletions
|
@ -104,7 +104,9 @@
|
||||||
(define (with-directory dir thunk)
|
(define (with-directory dir thunk)
|
||||||
(let ((pwd (current-directory)))
|
(let ((pwd (current-directory)))
|
||||||
(dynamic-wind
|
(dynamic-wind
|
||||||
(lambda () (change-directory dir))
|
(lambda ()
|
||||||
|
(if (not (change-directory dir))
|
||||||
|
(error "couldn't change directory" dir)))
|
||||||
thunk
|
thunk
|
||||||
(lambda () (change-directory pwd)))))
|
(lambda () (change-directory pwd)))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue