[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    patch - ftp.cc
From:       Julian Rockey <linux () jrockey ! com>
Date:       2001-09-01 23:16:17
[Download RAW message or body]

Further to my note earlier about the problem with StatJob not responding with 
a result() signal, from what I can see in kio/ftp/ftp.cc if a stat is done on 
a file for which a directory does not exist, error will be properly issued. 
I.e. if a stat is done for ftp://myhost.com/dir1/dir2/dir3/file.txt then if 
the directory dir3 does not exist StatJob will not return a result() signal. 
This seems incorrect to me as I think it should return an ERR_DOES_NOT_EXIST.

The one line patch attached seems to fix this. However whoever wrote ftp.cc 
might want to take a look before committing as I am not familiar with the 
code and the comment suggests the author believes an error should have been 
issued. However ftpSendCmd does not issue an error if the expected return 
code was not returned from the FTP server - it just returns false.

Julian

["ftp.diff" (text/x-diff)]

Index: ftp.cc
===================================================================
RCS file: /home/kde/kdelibs/kio/ftp/ftp.cc,v
retrieving revision 1.147
diff -u -3 -p -r1.147 ftp.cc
--- ftp.cc	2001/07/29 21:12:53	1.147
+++ ftp.cc	2001/09/01 22:20:56
@@ -1358,6 +1358,7 @@ void Ftp::stat( const KURL &url)
   {
     kdDebug(7102) << "stat: Could not go to parent directory" << endl;
     // error already emitted
+    error( ERR_DOES_NOT_EXIST, path );
     return;
   }
 

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic