Enruring home files exist before starting minim.
h3rald h3rald@h3rald.com
Sun, 06 Nov 2016 21:02:01 +0100
1 files changed,
6 insertions(+),
6 deletions(-)
jump to
M
minim.nim
→
minim.nim
@@ -98,6 +98,12 @@ return toSeq(walkDir(dir, true)).filterIt(it.path.toLowerAscii.startsWith(f.toLowerAscii)).mapIt("\"$1" % [it.path.replace("\\", "/")])
return symbols proc stdLib*(i: In) = + if not MINIMSYMBOLS.fileExists: + MINIMSYMBOLS.writeFile("{}") + if not MINIMHISTORY.fileExists: + MINIMHISTORY.writeFile("") + if not MINIMRC.fileExists: + MINIMRC.writeFile("") i.lang_module i.io_module i.logic_module@@ -108,12 +114,6 @@ i.time_module
i.fs_module i.crypto_module i.eval PRELUDE, "<prelude>" - if not MINIMSYMBOLS.fileExists: - MINIMSYMBOLS.writeFile("{}") - if not MINIMHISTORY.fileExists: - MINIMHISTORY.writeFile("") - if not MINIMRC.fileExists: - MINIMRC.writeFile("") i.eval MINIMRC.readFile() proc minimStream(s: Stream, filename: string, debugging = false) =