io.files.temp: When using temp-file, it's possible that it fails since

the temporary-directory does not exist yet.

Always check if the directory exists and create it if not.
handle-patch-and-put
Doug Coleman 2018-08-12 21:12:58 -05:00
parent 3f19ade4d3
commit a274f99437
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ SYMBOL: current-temp-directory
current-temp-directory get ;
: temp-file ( name -- path )
temp-directory prepend-path ;
temp-directory
[ make-directories ] [ prepend-path ] bi ;
: with-temp-directory ( quot -- )
[ temp-directory ] dip with-directory ; inline