From kde-commits Mon Dec 09 10:10:37 2002 From: Andras Mantia Date: Mon, 09 Dec 2002 10:10:37 +0000 To: kde-commits Subject: QUANTA_3_1_BRANCH: quanta X-MARC-Message: https://marc.info/?l=kde-commits&m=103942872429776 CVS commit by amantia: Workaround for KIO::file_move bug (does not use the permissions argument correctly). Fixes bug #51308. (backport) M +1 -0 ChangeLog 1.90.2.6 M +8 -1 quanta/dialogs/dirtydlg.cpp 1.1.2.1 M +1 -0 quanta/dialogs/dirtydlg.h 1.1.2.1 --- quanta/ChangeLog #1.90.2.5:1.90.2.6 @@ -12,4 +12,5 @@ KDE 3.0.x on our Sourceforge site. - security fixes - execution of command line type plugins fixed + - restore the correct permissions after diffing the modified files [#51308] Version 3.1-pr1 (Release date: 07-12-2002) --- quanta/quanta/dialogs/dirtydlg.cpp #1.1:1.1.2.1 @@ -25,4 +25,6 @@ #include #include +#include +#include //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.1.2.1 @@ -41,4 +41,5 @@ protected: // Protected attributes KURL m_dest; bool m_busy; + int m_permissions; protected slots: // Protected slots /** No descriptions */