Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions tempfile.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

import os
import math
when defined(windows):
import winlean
else:
import posix

const
MAX_RETRIES = 9999
Expand Down Expand Up @@ -58,10 +54,7 @@ proc mkdtemp*(prefix = "tmp", suffix = "", dir = ""): string =
for x in 0..MAX_RETRIES:
path = mktemp(prefix, suffix, dir)
try:
when defined(windows):
createDirectoryW(path)
else:
discard mkdir(path, 0o700)
createDir(path)
return path
except:
discard
Expand Down