Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 33066f7

Browse files
author
Huy ☭
committed
Merge pull request #2 from goldenreign/master
Fix compilation for Windows target
2 parents 6e06002 + 2b4e703 commit 33066f7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tempfile.nim

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import os
77
import math
8-
when defined(windows):
9-
import winlean
10-
else:
11-
import posix
128

139
const
1410
MAX_RETRIES = 9999
@@ -58,10 +54,7 @@ proc mkdtemp*(prefix = "tmp", suffix = "", dir = ""): string =
5854
for x in 0..MAX_RETRIES:
5955
path = mktemp(prefix, suffix, dir)
6056
try:
61-
when defined(windows):
62-
createDirectoryW(path)
63-
else:
64-
discard mkdir(path, 0o700)
57+
createDir(path)
6558
return path
6659
except:
6760
discard

0 commit comments

Comments
 (0)