If there are no folders present, show only the "Add Folder" button, and
hide the "Rescan All" button. Only show the latter when at least one
folder exists.
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
The button does nothing when the External Versioning is being used, so
it should not be displayed at all to avoid confusing the users.
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
As for right now, the External File Versioning does not support Cleanup
Interval. Therefore, the option should no be available at all when using
it.
Ref: https://forum.syncthing.net/t/16346
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
The button does nothing when the External Versioning is being used, so
it should not be displayed at all to avoid confusing the users.
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
As for right now, the External File Versioning does not support Cleanup
Interval. Therefore, the option should no be available at all when using
it.
Ref: https://forum.syncthing.net/t/16346
Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
An untrusted device will receive padded info for small blocks, and hence
sometimes request a larger block than actually exists on disk.
Previously we let this pass because we didn't have a hash to compare to
in that case and we ignored the EOF error based on that.
Now the untrusted device does pass an encrypted hash that we decrypt and
verify. This means we can't check for len(hash)==0 any more, but on the
other hand we do have a valid hash we can apply to the data we actually
read. If it matches then we don't need to worry about the read
supposedly being a bit short.
Benchmark results on Linux/amd64, using updated benchmark for old and
new:
name old time/op new time/op delta
HashFile-8 88.6ms ± 1% 88.3ms ± 1% -0.33% (p=0.046 n=19+19)
name old speed new speed delta
HashFile-8 201MB/s ± 1% 202MB/s ± 1% +0.33% (p=0.044 n=19+19)
name old alloc/op new alloc/op delta
HashFile-8 59.4kB ± 0% 46.1kB ± 0% -22.47% (p=0.000 n=14+20)
name old allocs/op new allocs/op delta
HashFile-8 29.0 ± 0% 27.0 ± 0% -6.90% (p=0.000 n=20+20)
Co-authored-by: greatroar <@>