@ -121,7 +121,7 @@ bool UBFileSystemUtils::copyFile(const QString &source, const QString &destinati
bool UBFileSystemUtils : : copy ( const QString & source , const QString & destination , bool overwrite )
bool UBFileSystemUtils : : copy ( const QString & source , const QString & destination , bool overwrite )
{
{
if ( QFileInfo ( source ) . isDir ( ) ) {
if ( QFileInfo ( source ) . isDir ( ) ) {
return copyDir ( source , destination ) ;
return copyDir ( source , destination , overwrite ) ;
} else {
} else {
return copyFile ( source , destination , overwrite ) ;
return copyFile ( source , destination , overwrite ) ;
}
}
@ -280,7 +280,7 @@ bool UBFileSystemUtils::deleteDir(const QString& pDirPath)
}
}
bool UBFileSystemUtils : : copyDir ( const QString & pSourceDirPath , const QString & pTargetDirPath )
bool UBFileSystemUtils : : copyDir ( const QString & pSourceDirPath , const QString & pTargetDirPath , bool overwite )
{
{
if ( pSourceDirPath = = " " | | pSourceDirPath = = " . " | | pSourceDirPath = = " .. " )
if ( pSourceDirPath = = " " | | pSourceDirPath = = " . " | | pSourceDirPath = = " .. " )
return false ;
return false ;
@ -304,8 +304,7 @@ bool UBFileSystemUtils::copyDir(const QString& pSourceDirPath, const QString& pT
}
}
else
else
{
{
QFile f ( pSourceDirPath + " / " + dirContent . fileName ( ) ) ;
successSoFar = copyFile ( pSourceDirPath + " / " + dirContent . fileName ( ) , pTargetDirPath + " / " + dirContent . fileName ( ) , overwite ) ;
successSoFar = f . copy ( pTargetDirPath + " / " + dirContent . fileName ( ) ) ;
}
}
}
}
else
else