propertiesdialog and remote files gives problems in kfileitem.cpp

David Faure dfaure at
Sun Mar 23 09:46:20 GMT 2003

Hash: SHA1

On Saturday 22 March 2003 22:30, Willy De la Court wrote:
> The last few hours i'v been trying to track down a bug i noticed and
> confirmed.
> which is not only related to fish but is also noteced with ftp
> when using an ioslave to view a remote directory let it be fish or ftp
> right clicking on any file in konquoror choosing properties changing some
> permission and then clicking OK works ok when looking at the file in another
> way say by using ls in a shell the changes are made. BUT konquoror believes
> the file or dir has the time set to 01/01/70 01:00 size 0 owner and group are
> blank permissions are all blank.
> I finally traced down the path it follows
> propertiesdialog calls a dcop method with a list of urls that are changed
>   KDirNotify_stub allDirNotify("*", "KDirNotify*");
>   allDirNotify.FilesChanged( lst );
> which is picked up by
> void KDirListerCache::FilesChanged( const KURL::List &fileList )
> ...
>       KFileItem* fileitem = findByURL( 0, *it );
> ...
>           fileitem->refresh();
> and calls the refresh() for that fileitem
> In KFileItem::refresh all the attributes of the FileItem are cleared and then
> the init is called. BUT init does not do anything for remote files.

Hmm, it sounds to me like 
1) refresh() shouldn't clear the attributes of the KFileItem
  if it's remote, knowing that init() won't recalc them
2) actually refreshing the stuff should be done somewhere else.
I'd suggest letting KDirListerCache update the current dir instead of
emitting "refreshItems" (with no new info yet).
Can you test the attached patch?

(Using NetAccess::stat here would _really_ be the wrong solution. If you
change 10 files, you'd have to wait for 10 synchronous network access....)

- -- 
David Faure -- faure at, dfaure at
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Version: GnuPG v1.0.7 (GNU/Linux)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdirlister.diff
Type: text/x-diff
Size: 1512 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list