diff --git a/gash/compat.scm b/gash/compat.scm index 7d067bd..41c6544 100644 --- a/gash/compat.scm +++ b/gash/compat.scm @@ -250,8 +250,12 @@ (define (open-file filename mode) (cond - ((string=? mode "r") (open-input-file filename)) - ((string=? mode "w") (open-output-file filename)) + ((or (string=? mode "r") + (string=? mode "rb")) + (open-input-file filename)) + ((or (string=? mode "w") + (string=? mode "wb")) + (open-output-file filename)) (else (error "Unsupported file mode" mode)))) ;; Because Mes is not careful when resolving syntax, this will