summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/os.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 513e09b48..9b08fe2e1 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -3255,7 +3255,11 @@ template rawToFormalFileInfo(rawInfo, path, formalInfo): untyped =
   ## 'rawInfo' is either a 'BY_HANDLE_FILE_INFORMATION' structure on Windows,
   ## or a 'Stat' structure on posix
   when defined(windows):
-    template merge(a, b): untyped = a or (b shl 32)
+    template merge(a, b): untyped =
+      int64(
+        (uint64(cast[uint32](a))) or
+        (uint64(cast[uint32](b)) shl 32)
+       )
     formalInfo.id.device = rawInfo.dwVolumeSerialNumber
     formalInfo.id.file = merge(rawInfo.nFileIndexLow, rawInfo.nFileIndexHigh)
     formalInfo.size = merge(rawInfo.nFileSizeLow, rawInfo.nFileSizeHigh)
1a5df0c48507af7'>^
0879f0b0a ^

1b1bb284d ^





0879f0b0a ^
180ab350d ^
d20a8ac68 ^
b2e486b23 ^
1b1bb284d ^

1dd9ec85b ^
f2f16f645 ^









f04b502cf ^

fc68a7d88 ^
f04b502cf ^



1b1bb284d ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43