io.files.temp: Initialize symbols after the backends are loaded. Top level code sucks.
parent
33b6c0426d
commit
2aadc94b10
|
@ -7,10 +7,6 @@ HOOK: default-temp-directory os ( -- path )
|
||||||
|
|
||||||
SYMBOL: current-temp-directory
|
SYMBOL: current-temp-directory
|
||||||
|
|
||||||
current-temp-directory [
|
|
||||||
default-temp-directory dup make-directories
|
|
||||||
] initialize
|
|
||||||
|
|
||||||
: temp-directory ( -- path )
|
: temp-directory ( -- path )
|
||||||
current-temp-directory get ;
|
current-temp-directory get ;
|
||||||
|
|
||||||
|
@ -24,10 +20,6 @@ HOOK: default-cache-directory os ( -- path )
|
||||||
|
|
||||||
SYMBOL: current-cache-directory
|
SYMBOL: current-cache-directory
|
||||||
|
|
||||||
current-cache-directory [
|
|
||||||
default-cache-directory dup make-directories
|
|
||||||
] initialize
|
|
||||||
|
|
||||||
: cache-directory ( -- path )
|
: cache-directory ( -- path )
|
||||||
current-cache-directory get ;
|
current-cache-directory get ;
|
||||||
|
|
||||||
|
@ -42,3 +34,11 @@ current-cache-directory [
|
||||||
{ [ os macosx? ] [ "io.files.temp.macosx" ] }
|
{ [ os macosx? ] [ "io.files.temp.macosx" ] }
|
||||||
{ [ os unix? ] [ "io.files.temp.unix" ] }
|
{ [ os unix? ] [ "io.files.temp.unix" ] }
|
||||||
} cond require
|
} cond require
|
||||||
|
|
||||||
|
\ current-temp-directory [
|
||||||
|
default-temp-directory dup make-directories
|
||||||
|
] initialize
|
||||||
|
|
||||||
|
\ current-cache-directory [
|
||||||
|
default-cache-directory dup make-directories
|
||||||
|
] initialize
|
||||||
|
|
Loading…
Reference in New Issue