[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/kdelibs/devel kdelibs-3.5.2-kio_file.patch, NONE, 1.1 kdelibs.spec, 1.137, 1.138
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/kdelibs/devel kdelibs-3.5.2-kio_file.patch, NONE, 1.1 kdelibs.spec, 1.137, 1.138
- Date: Tue, 23 May 2006 09:32:04 -0400
Author: than
Update of /cvs/dist/rpms/kdelibs/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv30996
Modified Files:
kdelibs.spec
Added Files:
kdelibs-3.5.2-kio_file.patch
Log Message:
fix #189677, No longer possible to "copy & rename" file in same directory
kdelibs-3.5.2-kio_file.patch:
job.cpp | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
--- NEW FILE kdelibs-3.5.2-kio_file.patch ---
--- kdelibs-3.5.2/kio/kio/job.cpp.me 2006-05-23 15:23:56.000000000 +0200
+++ kdelibs-3.5.2/kio/kio/job.cpp 2006-05-23 15:24:06.000000000 +0200
@@ -2786,7 +2786,7 @@
{
m_conflictError = job->error();
if ( (m_conflictError == ERR_DIR_ALREADY_EXIST)
- || (m_conflictError == ERR_FILE_ALREADY_EXIST) )
+ || (m_conflictError == ERR_FILE_ALREADY_EXIST) ) // can't happen?
{
KURL oldURL = ((SimpleJob*)job)->url();
// Should we skip automatically ?
@@ -3050,7 +3050,8 @@
m_conflictError = job->error(); // save for later
// Existing dest ?
if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST )
- || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) )
+ || ( m_conflictError == ERR_DIR_ALREADY_EXIST )
+ || ( m_conflictError == ERR_IDENTICAL_FILES ) )
{
subjobs.remove( job );
assert ( subjobs.isEmpty() );
@@ -3132,7 +3133,8 @@
m_reportTimer->stop();
if ( ( m_conflictError == ERR_FILE_ALREADY_EXIST )
- || ( m_conflictError == ERR_DIR_ALREADY_EXIST ) )
+ || ( m_conflictError == ERR_DIR_ALREADY_EXIST )
+ || ( m_conflictError == ERR_IDENTICAL_FILES ) )
{
// Its modification time:
time_t destmtime = (time_t)-1;
@@ -3161,6 +3163,7 @@
// Offer overwrite only if the existing thing is a file
// If src==dest, use "overwrite-itself"
RenameDlg_Mode mode;
+ bool isDir = true;
if( m_conflictError == ERR_DIR_ALREADY_EXIST )
mode = (RenameDlg_Mode) 0;
@@ -3172,6 +3175,7 @@
mode = M_OVERWRITE_ITSELF;
else
mode = M_OVERWRITE;
+ isDir = false;
}
if ( m_bSingleFileCopy )
@@ -3179,7 +3183,7 @@
else
mode = (RenameDlg_Mode) ( mode | M_MULTI | M_SKIP );
- res = Observer::self()->open_RenameDlg( this, m_conflictError == ERR_FILE_ALREADY_EXIST ?
+ res = Observer::self()->open_RenameDlg( this, !isDir ?
i18n("File Already Exists") : i18n("Already Exists as Folder"),
(*it).uSource.url(),
(*it).uDest.url(),
@@ -3602,7 +3606,9 @@
// In that case it's the _same_ dir, we don't want to copy+del (data loss!)
if ( m_currentSrcURL.isLocalFile() && m_currentSrcURL.url(-1) != dest.url(-1) &&
m_currentSrcURL.url(-1).lower() == dest.url(-1).lower() &&
- ( err == ERR_FILE_ALREADY_EXIST || err == ERR_DIR_ALREADY_EXIST ) )
+ ( err == ERR_FILE_ALREADY_EXIST ||
+ err == ERR_DIR_ALREADY_EXIST ||
+ err == ERR_IDENTICAL_FILES ) )
{
kdDebug(7007) << "Couldn't rename directly, dest already exists. Detected special case of lower/uppercase renaming in same dir, try with 2 rename calls" << endl;
QCString _src( QFile::encodeName(m_currentSrcURL.path()) );
@@ -3643,7 +3649,9 @@
Q_ASSERT( m_currentSrcURL == *m_currentStatSrc );
// Existing dest?
- if ( ( err == ERR_DIR_ALREADY_EXIST || err == ERR_FILE_ALREADY_EXIST )
+ if ( ( err == ERR_DIR_ALREADY_EXIST ||
+ err == ERR_FILE_ALREADY_EXIST ||
+ err == ERR_IDENTICAL_FILES )
&& isInteractive() )
{
if (m_reportTimer)
@@ -3693,7 +3701,7 @@
RenameDlg_Result r = Observer::self()->open_RenameDlg(
this,
- err == ERR_FILE_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"),
+ err != ERR_DIR_ALREADY_EXIST ? i18n("File Already Exists") : i18n("Already Exists as Folder"),
m_currentSrcURL.url(),
dest.url(),
mode, newPath,
Index: kdelibs.spec
===================================================================
RCS file: /cvs/dist/rpms/kdelibs/devel/kdelibs.spec,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- kdelibs.spec 22 May 2006 13:38:34 -0000 1.137
+++ kdelibs.spec 23 May 2006 13:31:46 -0000 1.138
@@ -24,7 +24,7 @@
%define disable_gcc_check_and_hidden_visibility 1
Version: 3.5.2
-Release: 6
+Release: 7
Summary: K Desktop Environment - Libraries
Name: kdelibs
Url: http://www.kde.org/
@@ -57,6 +57,7 @@
# upstream patches
patch100: kdelibs-3.5.2-kdeprint.patch
Patch101: kdelibs-3.5.2-cups-1.2.patch
+Patch102: kdelibs-3.5.2-kio_file.patch
%if %{arts}
Requires: arts >= %{arts_epoch}:%{arts_version}
@@ -191,6 +192,7 @@
# upstream patches
%patch100 -p1 -b .kdeprint
%patch101 -p1 -b .cups-1.2
+%patch102 -p1 -b .kio_file
# add redhat into KDE_VERSION_STRING
%if %{redhatify}
@@ -393,6 +395,9 @@
%doc %{_docdir}/HTML/en/kdelibs*
%changelog
+* Tue May 23 2006 Than Ngo <than redhat com> 7:3.5.2-7
+- fix #189677, No longer possible to "copy & rename" file in same directory
+
* Mon May 22 2006 Than Ngo <than redhat com> 6:3.5.2-6
- fix #192585, kdeprint writes incorrect cupsd.conf
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]