From kde-core-devel Thu Apr 08 14:56:49 2004 From: Gustavo Pichorim Boiko Date: Thu, 08 Apr 2004 14:56:49 +0000 To: kde-core-devel Subject: [PATCH] Dirwatcher isn't called in KDirLister redirections Message-Id: <200404081156.59346.boiko () conectiva ! com ! br> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=108143633206244 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-03=_5gWdA4DdI3ZZu2v" --Boundary-03=_5gWdA4DdI3ZZu2v Content-Type: multipart/mixed; boundary="Boundary-01=_xgWdAvankdDZ5qx" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_xgWdAvankdDZ5qx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi I was testing KDirLister and I found this problem: when KDirLister is=20 redirected (when KDirLister is called with devices:/devcdrommntcdrom, it is= =20 redirected to /mnt/cdrom), it doesn't set autoupdate to the redirected URL. In my case, I was testing the supermount behaviour with DNotify and FAM, an= d=20 when I called KDirLister directly to /mnt/cdrom, it works... Then I saw thi= s=20 problem. The attached patch is intended to solve the problem (I don't know if it is = the=20 best way to solve it, but at least it works) Please check the patch and tell me back if it is correctly or what I need t= o=20 do to make it right. Thanks =2D-=20 Gustavo Pichorim Boiko =2D- boiko @ conectiva . com . br --Boundary-01=_xgWdAvankdDZ5qx Content-Type: text/x-diff; charset="us-ascii"; name="kdirlister_redirection.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kdirlister_redirection.patch" =2D-- kdelibs-3.2.1/kio/kio/kdirlister.cpp.orig 2004-03-23 10:15:40.1137903= 24 -0300 +++ kdelibs-3.2.1/kio/kio/kdirlister.cpp 2004-03-23 10:15:47.367263627 -0300 @@ -1036,8 +1036,21 @@ delete dir->rootItem; dir->rootItem =3D 0; dir->lstItems->clear(); + =20 + dir =3D new DirItem(newUrl); + =20 itemsInUse.insert( newUrl.url(), dir ); urlsCurrentlyListed.insert( newUrl.url(), listers ); + =20 + listers =3D urlsCurrentlyListed.find( newUrl.url() ); + for (KDirLister *kdl =3D listers->first(); kdl; kdl=3Dlisters->next()) + { + if ( kdl->d->url.equals( newUrl, true ) && kdl->d->autoUpdate ) + { + dir->incAutoUpdate(); + break; + } + } } =20 void KDirListerCache::renameDir( const KURL &oldUrl, const KURL &newUrl ) --Boundary-01=_xgWdAvankdDZ5qx-- --Boundary-03=_5gWdA4DdI3ZZu2v Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBAdWg5ZQYlDr5VjykRArSAAJ9aTYz+Ovp6k8mcZneTXFMYtyyHlACfR57Z vQQScJe46diPgu8BfQhCrWA= =PrRp -----END PGP SIGNATURE----- --Boundary-03=_5gWdA4DdI3ZZu2v--