Bug 438841

Summary: Symlink files resulting in wrong file sizes
Product: [Applications] filelight Reporter: rezanmz
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: RESOLVED FIXED    
Severity: normal CC: rezanmz, sitter
Priority: NOR    
Version First Reported In: 21.04.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description rezanmz 2021-06-18 05:43:56 UTC
SUMMARY
Wrong file sizes for symlink files when indexing

STEPS TO REPRODUCE
1. Symlink a bunch of large files to arbitrary locations

OBSERVED RESULT
Filelight accounts for the size of symlink files when indexing. I have a lot of large files symlinked elsewhere on my computer. The total used space shown in filelight is larger than my SSD capacity!! and I only have a single SSD

EXPECTED RESULT
Symlink files are basically pointing to the original files. Their sizes should not be accounted when indexing.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Harald Sitter 2022-05-22 21:56:19 UTC
I am going out on a limb and say this is fixed because 21.04 is old and the currently code definitely doesn't deference symlinks

>        if (fstatat(m_dirfd, ent->d_name, &statbuf, AT_SYMLINK_NOFOLLOW) == -1) {