[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [PATCH] BUG 167388 inconsistency in ~/.kde4/share/config/trashrc
From: <wppan () redflag-linux ! com>
Date: 2009-09-02 6:52:20
Message-ID: 4A9E1624.70409 () redflag-linux ! com
[Download RAW message or body]
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
["kdebase-kiotrash.patch" (text/x-patch)]
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();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic