Fixed warning when compiling for Nim v1.4.0
h3rald h3rald@h3rald.com
Sat, 31 Oct 2020 23:09:48 +0100
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
hastysite.nim
→
hastysite.nim
@@ -116,7 +116,7 @@ var matches: array[0..1, string]
discard def.match(PEG_CSS_IMPORT, matches) let partial = folder/"_" & matches[0].strip & ".css" var contents = "" - if partial.existsFile: + if partial.fileExists: contents = partial.readFile result = result.replace(def, contents) else:@@ -234,7 +234,7 @@ file.close()
result.scripts[key] = %desc proc preprocess*(hs: var HastySite) = - if hs.dirs.tempContents.existsDir: + if hs.dirs.tempContents.dirExists: hs.dirs.tempContents.removeDir var meta = newJObject() for f in hs.dirs.contents.walkDirRec():