chore: stop treating dirs as having size 128 (#10750)

Resp. directories for the database, and both dirs and symlinks for
`FileInfo.FileSize`. Instead handle it in the UI progress percentage. We
even already have special cases there for deletions, might as well
handle directories just like any other zero-sized needed item there.

This went through the very thorough testing of running it on my laptop,
the migration was applied and it seemed to be working fine after.

---------

Signed-off-by: Simon Frei <freisim93@gmail.com>
This commit is contained in:
Simon Frei
2026-06-22 20:32:03 +02:00
committed by GitHub
parent 5313c75eba
commit c9236b1adc
12 changed files with 44 additions and 41 deletions
+3 -4
View File
@@ -29,7 +29,6 @@ import (
const (
folderID = "test"
blockSize = 128 << 10
dirSize = 128
)
func TestBasics(t *testing.T) {
@@ -72,11 +71,11 @@ func TestBasics(t *testing.T) {
t.Fatal(err)
}
const (
localSize = (1+2+3)*blockSize + dirSize
localSize = (1+2+3)*blockSize
remoteSize = (3 + 4 + 5) * blockSize
globalSize = (2+3+3+4+5)*blockSize + dirSize
globalSize = (2+3+3+4+5)*blockSize
needSizeLocal = remoteSize
needSizeRemote = (2+3)*blockSize + dirSize
needSizeRemote = (2+3)*blockSize
)
t.Run("SchemaVersion", func(t *testing.T) {