Handle removeDir error when removing Nimble's temp dir.

Replaces #537.
This commit is contained in:
Dominik Picheta 2018-09-11 21:11:41 +01:00
commit c09b273eaf

View file

@ -1110,7 +1110,11 @@ when isMainModule:
except NimbleQuit: except NimbleQuit:
discard discard
finally: finally:
removeDir(getNimbleTempDir()) try:
removeDir(getNimbleTempDir())
except OSError:
let msg = "Couldn't remove Nimble's temp dir"
display("Warning:", msg, Warning, MediumPriority)
if error.len > 0: if error.len > 0:
displayTip() displayTip()