lib: Use uint64 for disk stats (ref #3930) (#7019)

This commit is contained in:
Simon Frei
2020-10-02 15:22:28 +02:00
committed by GitHub
parent a20c6ca868
commit 48da6f0f22
6 changed files with 62 additions and 20 deletions
+2 -2
View File
@@ -995,7 +995,7 @@ func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, sn
tempName := fs.TempName(target.Name)
if f.versioner != nil {
err = f.CheckAvailableSpace(source.Size)
err = f.CheckAvailableSpace(uint64(source.Size))
if err == nil {
err = osutil.Copy(f.CopyRangeMethod, f.fs, f.fs, source.Name, tempName)
if err == nil {
@@ -1239,7 +1239,7 @@ func (f *sendReceiveFolder) copierRoutine(in <-chan copyBlocksState, pullChan ch
}
for state := range in {
if err := f.CheckAvailableSpace(state.file.Size); err != nil {
if err := f.CheckAvailableSpace(uint64(state.file.Size)); err != nil {
state.fail(err)
// Nothing more to do for this failed file, since it would use to much disk space
out <- state.sharedPullerState