feat: update godf for bsd

This commit is contained in:
Samuel N Cui
2023-10-04 11:26:18 +08:00
parent b9f8584ad5
commit b13b740940
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ func (m *diskUsageCache) check(need int64) error {
return fmt.Errorf("get disk usage fail, mount_point= %s, %w", m.mountPoint, err)
}
m.freeSpace = int64(usage.Available())
m.freeSpace = usage.Available()
m.used = need
if m.used > m.freeSpace {
return fmt.Errorf("%w, want= %d have= %d", ErrTargetNoSpace, m.used, m.freeSpace)

2
go.mod
View File

@@ -11,7 +11,7 @@ require (
github.com/moby/sys/mountinfo v0.6.2
github.com/modern-go/reflect2 v1.0.2
github.com/samber/lo v1.38.1
github.com/samuelncui/godf v0.0.0-20230927093204-37ea5acb9fc1
github.com/samuelncui/godf v0.0.0-20231004032257-e436410ad5a0
github.com/schollz/progressbar/v3 v3.13.1
github.com/sirupsen/logrus v1.9.3
)