Skip to content

Commit c291e92

Browse files
authored
Merge pull request #7 from datsfilipe/fix-get-file-creation-time
fix: use simplified approach instead of unix specific
2 parents 4e3d73a + 07ac1f3 commit c291e92

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pkg/register/register.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"slices"
1111
"strconv"
1212
"strings"
13-
"syscall"
1413
"time"
1514
)
1615

@@ -243,9 +242,5 @@ func getFileCreationTime(filePath string) (time.Time, error) {
243242
if err != nil {
244243
return time.Time{}, err
245244
}
246-
stat, ok := info.Sys().(*syscall.Stat_t)
247-
if ok {
248-
return time.Unix(int64(stat.Ctim.Sec), int64(stat.Ctim.Nsec)), nil
249-
}
250245
return info.ModTime(), nil
251246
}

0 commit comments

Comments
 (0)