io.files.temp: Initialize symbols after the backends are loaded. Top level code sucks.

locals-and-roots
Doug Coleman 2016-03-16 21:25:19 -07:00
parent 33b6c0426d
commit 2aadc94b10
1 changed files with 8 additions and 8 deletions

View File

@ -7,10 +7,6 @@ HOOK: default-temp-directory os ( -- path )
SYMBOL: current-temp-directory
current-temp-directory [
default-temp-directory dup make-directories
] initialize
: temp-directory ( -- path )
current-temp-directory get ;
@ -24,10 +20,6 @@ HOOK: default-cache-directory os ( -- path )
SYMBOL: current-cache-directory
current-cache-directory [
default-cache-directory dup make-directories
] initialize
: cache-directory ( -- path )
current-cache-directory get ;
@ -42,3 +34,11 @@ current-cache-directory [
{ [ os macosx? ] [ "io.files.temp.macosx" ] }
{ [ os unix? ] [ "io.files.temp.unix" ] }
} cond require
\ current-temp-directory [
default-temp-directory dup make-directories
] initialize
\ current-cache-directory [
default-cache-directory dup make-directories
] initialize