From: Sergey Matveev Date: Wed, 1 May 2019 19:33:36 +0000 (+0300) Subject: Forcefuly convert sys-related data X-Git-Tag: 4.1^2~1 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=191a6f4e446c9c4b7c26fd746300bb775462c9bd;p=nncp.git Forcefuly convert sys-related data Because various systems provide various data types. --- diff --git a/src/cypherpunks.ru/nncp/ctx.go b/src/cypherpunks.ru/nncp/ctx.go index fb7246a..3f4def9 100644 --- a/src/cypherpunks.ru/nncp/ctx.go +++ b/src/cypherpunks.ru/nncp/ctx.go @@ -112,5 +112,5 @@ func (ctx *Ctx) IsEnoughSpace(want int64) bool { if err := unix.Statfs(ctx.Spool, &s); err != nil { log.Fatalln(err) } - return s.Bavail*int64(s.Bsize) > want + return int64(s.Bavail)*int64(s.Bsize) > want }