propertiesdialog and remote files gives problems in kfileitem.cpp

Willy De la Court Willy.DelaCourt at pandora.be
Sun Mar 23 10:25:55 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 23 March 2003 10:46, David Faure wrote:
> 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.
> >
> > http://bugs.kde.org/show_bug.cgi?id=52062
> >
> > 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....)

Nice this seems to fix the problem
can you commit it?

- -- 
Simple things make people happy.
Willy De la Court

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+fYuz/ghobDfHpokRAs7eAJ4tUPqfu7hb2u5rXgj+9e1NOI6GRQCeNKht
4l4X+Mrf0YwtwBGlmpzbUJI=
=5+au
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list