Version: (using KDE KDE 3.0.5) Installed from: SuSE RPMs OS: Linux When opening a file from the desktop and I have quanta already open (with kompare as tool installed), then quanta opens a second instance opening the same files I've opened before, plus the new one. When I change something in the files that I had opened previously, both quanta instances run kompare and whatever I choose from kompare after the result has been shown, I'm ending up with a sourcefile, that is chmoded to -rw- for the user only. Probably best would be to limit quanta to a single instance, to avoid such conditions.
Subject: quanta/quanta/dialogs CVS commit by amantia: Workaround for KIO::file_move bug (does not use the permissions argument correctly). Fixed bug #51308. BTW, you can use the --unique switch to limit quanta to a single instance. CCMAIL: 51308-done@bugs.kde.org M +8 -1 dirtydlg.cpp 1.2 M +1 -0 dirtydlg.h 1.2 --- quanta/quanta/dialogs/dirtydlg.cpp #1.1:1.2 @@ -25,4 +25,6 @@ #include <kio/job.h> #include <kio/jobclasses.h> +#include <kio/netaccess.h> +#include <kfileitem.h> //app includes @@ -64,5 +66,9 @@ void DirtyDlg::slotCompareDone(KProcess* delete proc; - KIO::FileCopyJob *job = KIO::file_move(m_dest, m_src, -1, true, false,false ); + KIO::UDSEntry entry; + KIO::NetAccess::stat(m_src, entry); + KFileItem item(entry, m_src, false, true); + m_permissions = item.permissions(); + KIO::FileCopyJob *job = KIO::file_move(m_dest, m_src, m_permissions, true, false,false ); connect( job, SIGNAL(result( KIO::Job *)), SLOT (slotResult( KIO::Job *))); @@ -73,4 +79,5 @@ void DirtyDlg::slotCompareDone(KProcess* void DirtyDlg::slotResult(KIO::Job *) { + KIO::chmod(m_src, m_permissions); m_busy = false; accept(); --- quanta/quanta/dialogs/dirtydlg.h #1.1:1.2 @@ -41,4 +41,5 @@ protected: // Protected attributes KURL m_dest; bool m_busy; + int m_permissions; protected slots: // Protected slots /** No descriptions */