forked from qt-creator/qt-creator
Utils: Add a code path taking care of cross-device file copies
Not optimal, but will suffice for docker callgrind. Change-Id: Iac669fe9dd29206df2a4ffc61d659afce2f7a6c4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1307,6 +1307,11 @@ bool FilePath::removeRecursively(QString *error) const
|
|||||||
|
|
||||||
bool FilePath::copyFile(const FilePath &target) const
|
bool FilePath::copyFile(const FilePath &target) const
|
||||||
{
|
{
|
||||||
|
if (host() != target.host()) {
|
||||||
|
// FIXME: This does not scale.
|
||||||
|
const QByteArray ba = fileContents();
|
||||||
|
return target.writeFileContents(ba);
|
||||||
|
}
|
||||||
if (needsDevice()) {
|
if (needsDevice()) {
|
||||||
QTC_ASSERT(s_deviceHooks.copyFile, return false);
|
QTC_ASSERT(s_deviceHooks.copyFile, return false);
|
||||||
return s_deviceHooks.copyFile(*this, target);
|
return s_deviceHooks.copyFile(*this, target);
|
||||||
|
Reference in New Issue
Block a user