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