diff --git a/bin/ikarus b/bin/ikarus index 36b5f12..e112280 100755 Binary files a/bin/ikarus and b/bin/ikarus differ diff --git a/bin/ikarus-runtime.c b/bin/ikarus-runtime.c index c42e671..5a8cd35 100644 --- a/bin/ikarus-runtime.c +++ b/bin/ikarus-runtime.c @@ -575,7 +575,13 @@ ERRORS */ ikp ikrt_file_exists(ikp filename){ - char* str = string_data(filename); + char* str; + if(tagof(filename) == bytevector_tag){ + str = (char*)filename + off_bytevector_data; + } else { + fprintf(stderr, "bug in ikrt_file_exists\n"); + exit(-1); + } struct stat sb; int st = stat(str, &sb); if(st == 0){ diff --git a/src/ikarus.boot b/src/ikarus.boot index 44606a2..63945cc 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/ikarus.posix.ss b/src/ikarus.posix.ss index 03dda6c..519ace9 100644 --- a/src/ikarus.posix.ss +++ b/src/ikarus.posix.ss @@ -40,7 +40,8 @@ (lambda (x) (unless (string? x) (error 'file-exists? "filename ~s is not a string" x)) - (let ([v (foreign-call "ikrt_file_exists" x)]) + (let ([v (foreign-call "ikrt_file_exists" + (string->utf8-bytevector x))]) (cond [(boolean? v) v] [else