[SCM] Kaboom - Debian KDE 3->4 migration tool branch, master, updated. a0967ee81a3881b95f6210de51c55f37cfe1c4f2
George Kiagiadakis
gkiagia-guest at alioth.debian.org
Wed Feb 18 12:49:56 UTC 2009
The following commit has been merged in the master branch:
commit a0967ee81a3881b95f6210de51c55f37cfe1c4f2
Author: George Kiagiadakis <gkiagia at users.sourceforge.net>
Date: Wed Feb 18 14:47:12 2009 +0200
Fix mergeDirs. Now it actually works :)
diff --git a/diroperations/diroperations.cpp b/diroperations/diroperations.cpp
index 46c49a2..774aa7c 100644
--- a/diroperations/diroperations.cpp
+++ b/diroperations/diroperations.cpp
@@ -211,7 +211,7 @@ void mergeDirs(const QString & sourcePath, const QString & destPath, ProgressDia
if ( currentItem.isSymLink() )
{
- if (QFileInfo(dest,"currentname").exists())
+ if ( QFile::exists(dest.absoluteFilePath(currentName)) )
if(!QFile::remove(dest.absoluteFilePath(currentName)))
throw Exception(Exception::RmFail,currentItem.absoluteFilePath());
if ( !QFile::link( relativeSymLinkTarget(source.absoluteFilePath(currentName)),
@@ -220,13 +220,15 @@ void mergeDirs(const QString & sourcePath, const QString & destPath, ProgressDia
}
else if ( currentItem.isDir() )
{
- if ( !dest.cd(currentName) )
- if ( !dest.mkdir(currentName) )
- throw Exception(Exception::MkdirFail, dest.absoluteFilePath(currentName));
if ( !source.cd(currentName) )
throw Exception(Exception::AccessDenied, source.absoluteFilePath(currentName));
- if ( !dest.cd(currentName) )
- throw Exception(Exception::AccessDenied, dest.absoluteFilePath(currentName)); //quite impossible
+ if ( !dest.cd(currentName) ) {
+ //if the target dir doesn't exist, create it and try again.
+ if ( !dest.mkdir(currentName) )
+ throw Exception(Exception::MkdirFail, dest.absoluteFilePath(currentName));
+ if ( !dest.cd(currentName) )
+ throw Exception(Exception::AccessDenied, dest.absoluteFilePath(currentName)); //quite impossible
+ }
stack.push(currentList);
currentList = source.entryInfoList( filters, QDir::DirsLast );
--
Kaboom - Debian KDE 3->4 migration tool
More information about the pkg-kde-commits
mailing list