Hi, all When look into BUG 167388, I find that plasma-desktop and dolphin use kio_trash to deal with trash, and class TrashImpl is responsible to keep trashrc consistent. But if more than one kio_trash are created, inconsistency may occur, because TrashImpl doesn't make sure whether the config file is the latest before reading or writing.
ReparseConfiguration is expensive, but I can't find better way now. Regards -- 潘卫平(Peter Pan) Red Flag Software Co., Ltd
Index: trashimpl.cpp =================================================================== --- trashimpl.cpp (revision 1018673) +++ trashimpl.cpp (working copy) @@ -771,6 +771,7 @@ void TrashImpl::fileAdded() { + m_config.reparseConfiguration(); KConfigGroup group = m_config.group( "Status" ); if ( group.readEntry( "Empty", true) == true ) { group.writeEntry( "Empty", false ); @@ -784,6 +785,7 @@ void TrashImpl::fileRemoved() { if ( isEmpty() ) { + m_config.reparseConfiguration(); KConfigGroup group = m_config.group( "Status" ); group.writeEntry( "Empty", true ); m_config.sync();
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel