|
|
@ -105,6 +105,11 @@ bool UBFileSystemUtils::copyFile(const QString &source, const QString &destinati |
|
|
|
if (QFileInfo(normalizedDestination).isFile() && overwrite) { |
|
|
|
if (QFileInfo(normalizedDestination).isFile() && overwrite) { |
|
|
|
QFile::remove(normalizedDestination); |
|
|
|
QFile::remove(normalizedDestination); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!overwrite) |
|
|
|
|
|
|
|
return true; // don't try to copy an existing file if overwrite is false
|
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
normalizedDestination = normalizedDestination.replace(QString("\\"), QString("/")); |
|
|
|
normalizedDestination = normalizedDestination.replace(QString("\\"), QString("/")); |
|
|
|
int pos = normalizedDestination.lastIndexOf("/"); |
|
|
|
int pos = normalizedDestination.lastIndexOf("/"); |
|
|
@ -300,7 +305,7 @@ bool UBFileSystemUtils::copyDir(const QString& pSourceDirPath, const QString& pT |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (dirContent.isDir()) |
|
|
|
if (dirContent.isDir()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
successSoFar = copyDir(pSourceDirPath + "/" + dirContent.fileName(), pTargetDirPath + "/" + dirContent.fileName()); |
|
|
|
successSoFar = copyDir(pSourceDirPath + "/" + dirContent.fileName(), pTargetDirPath + "/" + dirContent.fileName(), overwite); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|