SVN commit 532794 by pfeiffer: KPropertiesDialog first renames the file, then allows all plugins to save their changes. -> the KFileMetaInfo-plugin needs to write to the new file instead of the old BUG: 125832 M +1 -1 kfile/kmetaprops.cpp M +13 -1 kio/kfilemetainfo.cpp M +10 -1 kio/kfilemetainfo.h --- branches/KDE/3.5/kdelibs/kio/kfile/kmetaprops.cpp #532793:532794 @@ -262,7 +262,7 @@ QPtrListIterator it( d->m_editWidgets ); KFileMetaInfoWidget* w; for (; (w = it.current()); ++it) w->apply(); - d->m_info.applyChanges(); + d->m_info.applyChanges(properties->kurl().path()); } #include "kmetaprops.moc" --- branches/KDE/3.5/kdelibs/kio/kio/kfilemetainfo.cpp #532793:532794 @@ -527,6 +527,11 @@ bool KFileMetaInfo::applyChanges() { + return applyChanges( path() ); +} + +bool KFileMetaInfo::applyChanges( const QString& path ) +{ bool doit = false; // kdDebug(7033) << "KFileMetaInfo::applyChanges()\n"; @@ -563,7 +568,14 @@ // kdDebug(7033) << "Ok, trying to write the info\n"; - return p->writeInfo(*this); + KURL savedURL = url(); + d->url = KURL(); + d->url.setPath( path ); + + bool ret = p->writeInfo(*this); + + d->url = savedURL; + return ret; } KFilePlugin * const KFileMetaInfo::plugin() const --- branches/KDE/3.5/kdelibs/kio/kio/kfilemetainfo.h #532793:532794 @@ -1149,7 +1149,16 @@ */ bool applyChanges(); - /** + /** + * This method writes all pending changes of the meta info to the file @p path. + * If any items are marked as removed, they are really removed from the + * list. The info object as well as all items are updated. + * + * @return true if successful, false if not + */ + bool applyChanges(const QString& path); + + /** * Checks whether an item with the given @p key exists. * * @param key the key to check