gui, lib/db: Correct space accounting of symlinks, for "out of sync" status

This commit is contained in:
Jakob Borg
2016-12-09 10:38:36 +01:00
parent a7f7058636
commit a9b03de99a
4 changed files with 5 additions and 5 deletions

View File

@@ -73,7 +73,7 @@ func (s *sizeTracker) addFile(f FileIntf) {
switch {
case f.IsDeleted():
s.Deleted++
case f.IsDirectory():
case f.IsDirectory() && !f.IsSymlink():
s.Directories++
case f.IsSymlink():
s.Symlinks++
@@ -93,7 +93,7 @@ func (s *sizeTracker) removeFile(f FileIntf) {
switch {
case f.IsDeleted():
s.Deleted--
case f.IsDirectory():
case f.IsDirectory() && !f.IsSymlink():
s.Directories--
case f.IsSymlink():
s.Symlinks--

View File

@@ -50,7 +50,7 @@ func (f FileInfoTruncated) FileSize() int64 {
if f.Deleted {
return 0
}
if f.IsDirectory() {
if f.IsDirectory() || f.IsSymlink() {
return protocol.SyntheticDirectorySize
}
return f.Size