KIO::listRecursive & link

Andras Mantia amantia at
Tue Nov 23 09:58:09 GMT 2004

Hash: SHA1

On Tuesday 23 November 2004 11:41, David Faure wrote:
> On Tuesday 23 November 2004 10:14, Andras Mantia wrote:
> > Hi,
> >
> >  I discovered that KIO::listRecursive does not follow linked
> > directories. Is this the desired behavior or a bug?
> It's obviously wanted. Would you want that copying a directory in
> konqueror follows the links and copies everything under them? Naah :)

Eh, maybe not in this case, but it would be nice to have it.
> > In the former case,
> > I will update the documentation to state this explicitely.
> OK.
> Of course if you need a listRecursive that follows link, you could
> add a setter for that and implement it - but take care of infinite
> recursions etc. ...

I did it locally, so it follows the symlinks with the current 
listRecursive (call a new listRecursive for each item that is a 
directory and a link) *without* any guard against infinite recursion 
and I *tested* it with infinite recursion. I suspected an infinite 
loop. For my surprise it wasn't infinite at all. After some time it 
simply didn't follow the link. I verified in Midnight Commander and 
there as well, after some depth the links are not valid. Konqueror 
gives an error as well: "The file or folder [long path comes here] does 
not exist." I suspect this is because of the limitation of a path name 
length on the file system. The question is if there are filesystems 
with no such limitations, or in other words, can be there a real 
infinite recursion?


- -- 
Quanta Plus developer -
K Desktop Environment -
Version: GnuPG v1.2.4 (GNU/Linux)


More information about the kde-core-devel mailing list