bug fix:struct error while get file creation date

master v1.0.1
兔子 4 years ago
parent ad5c18667a
commit c3a165e64a

@ -13,9 +13,9 @@ func timespecToTime(ts syscall.Timespec) time.Time {
}
func GetFileCreationTime(fileinfo os.FileInfo) time.Time {
return timespecToTime(stat_t.Ctim)
return timespecToTime(fileinfo.Sys().(*syscall.Stat_t).Ctim)
}
func GetFileAccessTime(fileinfo os.FileInfo) time.Time {
return timespecToTime(stat_t.Atim)
return timespecToTime(fileinfo.Sys().(*syscall.Stat_t).Atim)
}

Loading…
Cancel
Save