Fix Windows file date
This commit is contained in:
parent
0a014e084f
commit
7870840d2d
1 changed files with 3 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue