Bug 136876 - Symlinks in trash should show symlink size, not file size.
Summary: Symlinks in trash should show symlink size, not file size.
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: trash (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-05 10:47 UTC by Viesturs Zarins
Modified: 2006-11-06 12:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Viesturs Zarins 2006-11-05 10:47:27 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages

If i create a symlink of a large file and delete it later, the size of a symlink in trash is the size of the file the symlink links to.

I would expect the file sizes in trash to show how much space my trash takes up.

The correct behavior would be to show the symlink size which usually is about hundread bytes.
Comment 1 David Faure 2006-11-06 12:12:25 UTC
SVN commit 602619 by dfaure:

[Bug 136876] Symlinks in trash should show symlink size, not file size.
BUG: 136876


 M  +4 -0      kio_trash.cpp  


--- branches/KDE/3.5/kdebase/kioslave/trash/kio_trash.cpp #602618:602619
@@ -407,6 +407,9 @@
 
         addAtom( entry, KIO::UDS_LINK_DEST, 0, QFile::decodeName( buffer2 ) );
         // Follow symlink
+        // That makes sense in kio_file, but not in the trash, especially for the size
+        // #136876
+#if 0
         if ( KDE_stat( physicalPath_c, &buff ) == -1 ) {
             // It is a link pointing to nowhere
             buff.st_mode = S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO;
@@ -414,6 +417,7 @@
             buff.st_atime = 0;
             buff.st_size = 0;
         }
+#endif
     }
     mode_t type = buff.st_mode & S_IFMT; // extract file type
     mode_t access = buff.st_mode & 07777; // extract permissions