Fix Windows file date

This commit is contained in:
Ganesh Viswanathan 2020-06-16 23:37:03 -05:00
commit 7870840d2d

View file

@ -244,7 +244,9 @@ proc getFileDate*(fullpath: string): string =
ret = 0
cmd =
when defined(Windows):
&"cmd /c for %a in ({fullpath.sanitizePath}) do echo %~ta"
let
(head, tail) = fullpath.splitPath()
&"cmd /c forfiles /P {head.sanitizePath()} /M {tail.sanitizePath} /C \"cmd /c echo @fdate @ftime @fsize\""
elif defined(Linux):
&"stat -c %y {fullpath.sanitizePath}"
elif defined(OSX) or defined(FreeBSD):