Skip to content

Commit

Permalink
Merge pull request #206 from arclanguage/expand-user-directories
Browse files Browse the repository at this point in the history
When opening a file, expand user directories.
  • Loading branch information
zck committed Jun 11, 2021
2 parents 04aadf4 + 21fcbcf commit 67522d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ac.rkt
Expand Up @@ -1006,10 +1006,13 @@

(xdef call/ec call-with-escape-continuation)

(xdef infile open-input-file)
(xdef infile (lambda (f . args)
(apply open-input-file
(expand-user-path f)
args)))

(xdef outfile (lambda (f . args)
(open-output-file f
(open-output-file (expand-user-path f)
;#:mode 'text
#:exists (if (equal? args '(append))
'append
Expand Down

0 comments on commit 67522d1

Please sign in to comment.