[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    QUANTA_3_1_BRANCH: quanta
From:       Andras Mantia <amantia () freemail ! hu>
Date:       2002-12-09 10:10:37
[Download RAW message or body]

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 <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.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 */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic