Skip to content

Commit

Permalink
fix os
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Oct 2, 2024
1 parent a20ff29 commit bbcb2dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ proc setLastModificationTime*(file: string, t: times.Time) {.noWeirdTarget.} =
## an error.
when defined(posix):
let unixt = posix.Time(t.toUnix)
let micro = convert(Nanoseconds, Microseconds, t.nanosecond)
let micro = convert(Nanoseconds, Microseconds, t.nanosecond).int32
var timevals = [Timeval(tv_sec: unixt, tv_usec: micro),
Timeval(tv_sec: unixt, tv_usec: micro)] # [last access, last modification]
if utimes(file, timevals.addr) != 0: raiseOSError(osLastError(), file)
Expand Down

0 comments on commit bbcb2dd

Please sign in to comment.