Skip to content

Commit

Permalink
fix usages of getTempDir, refs nim-lang/Nim#17402 (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored Mar 18, 2021
1 parent 0351935 commit 53a18a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ proc createRcFile(path: string): Config =

let
uniquePrefix = epochTime().int
bufferSource = getTempDir() & "inim_" & $uniquePrefix & ".nim"
validCodeSource = getTempDir() & "inimvc_" & $uniquePrefix & ".nim"
tmpHistory = getTempDir() & "inim_history_" & $uniquePrefix & ".nim"
bufferSource = getTempDir() / "inim_" & $uniquePrefix & ".nim"
validCodeSource = getTempDir() / "inimvc_" & $uniquePrefix & ".nim"
tmpHistory = getTempDir() / "inim_history_" & $uniquePrefix & ".nim"

proc compileCode(): auto =
# PENDING https://github.com/nim-lang/Nim/issues/8312,
Expand Down Expand Up @@ -143,7 +143,7 @@ proc cleanExit(exitCode = 0) =
removeFile(bufferSource) # Temp .nim
removeFile(bufferSource[0..^5]) # Temp binary, same filename without ".nim"
removeFile(tmpHistory)
removeDir(getTempDir() & "nimcache")
removeDir(getTempDir() / "nimcache")
config.writeConfig(app.rcFile)
when promptHistory:
# Save our history
Expand Down

0 comments on commit 53a18a5

Please sign in to comment.