Bug 69158 - fish shows size of target file for symlinks
Summary: fish shows size of target file for symlinks
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: fish (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Jörg Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-27 16:41 UTC by dexter
Modified: 2004-01-01 22:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dexter 2003-11-27 16:41:16 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Fish shows the size of target file for symlinks. It causes that file manager wrong counts size of directory.

If it is feature, not bug, then please provide some switch to restore original unix behaviour (i.e. fish://user@host:lstat/)

Proposed patch:

--- f   2003-11-27 13:50:25.000000000 +0100
+++ .fishsrv.pl 2003-11-27 14:08:28.000000000 +0100
@@ -3,7 +3,7 @@
 chdir($dn) || do { print "### 500 $!\n"; next; };
 foreach (@entries) {
 my $link = readlink;
-my ($mode,$uid,$gid,$size,$mtime) = (stat)[2,4,5,7,9];
+my ($mode,$uid,$gid,$size,$mtime) = (lstat)[2,4,5,7,9];
 print filetype($mode,$link,$uid,$gid);
 print "S$size\n";
 print strftime("D%Y %m %d %H %M %S\n",localtime($mtime));
Comment 1 Dominique Devriese 2003-12-12 14:30:34 UTC
This bug has also been posted ( with the same patch ) to the Debian BTS:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=22230

I also confirmed it, the patch seems correct to me, but I haven't tested it.

cheers
domi
Comment 2 Dominique Devriese 2003-12-31 02:41:10 UTC
That should've been http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=222304
Comment 3 David Faure 2004-01-01 22:13:36 UTC
Subject: yes

Patch looks ok, please apply.

Comment 4 Dominique Devriese 2004-01-01 22:22:46 UTC
Subject: kdebase/kioslave/fish

CVS commit by domi: 

Apply patch from http://bugs.kde.org/show_bug.cgi?id=69158

Approved by David Faure.

Will backport.

CCMAIL:faure@kde.org
CCMAIL:69158-done@bugs.kde.org


  M +1 -1      fish.pl   1.12


--- kdebase/kioslave/fish/fish.pl  #1.11:1.12
@@ -166,5 +166,5 @@
         foreach (@entries) {
             my $link = readlink;
-            my ($mode,$uid,$gid,$size,$mtime) = (stat)[2,4,5,7,9];
+            my ($mode,$uid,$gid,$size,$mtime) = (lstat)[2,4,5,7,9];
             print filetype($mode,$link,$uid,$gid);
             print "S$size\n";