Skip to content

Commit

Permalink
uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
lai3d committed Jan 26, 2024
1 parent f488e5e commit da76141
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions disk/stat_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
)

func DirSize(path string) (int64, error) {
var size int64
func DirSize(path string) (uint64, error) {
var size uint64
entries, err := os.ReadDir(path)
if err != nil {
return size, err
Expand All @@ -28,7 +28,7 @@ func DirSize(path string) (int64, error) {
log.Printf("failed to get info of file %s: %v\n", entry.Name(), err)
continue
}
size += fileInfo.Size()
size += uint64(fileInfo.Size())
}
}
return size, nil
Expand Down

0 comments on commit da76141

Please sign in to comment.