Commit e40a0ca9 authored by Christian Kandeler's avatar Christian Kandeler

Maemo: Fix directory deployment issues.

parent 2781453b
......@@ -323,8 +323,10 @@ bool MaemoMountAndCopyDeployStep::isDeploymentNeeded(const QString &hostName) co
const int deployableCount = deployables->deployableCount();
for (int i = 0; i < deployableCount; ++i) {
const MaemoDeployable &d = deployables->deployableAt(i);
if (currentlyNeedsDeployment(hostName, d))
if (currentlyNeedsDeployment(hostName, d)
|| QFileInfo(d.localFilePath).isDir()) {
m_filesToCopy << d;
}
}
return !m_filesToCopy.isEmpty();
}
......
......@@ -312,18 +312,13 @@ void MaemoCopyToSysrootStep::run(QFutureInterface<bool> &fi)
const QFileInfo localFileInfo(deployable.localFilePath);
const QString targetFilePath = tc->sysroot() + sep
+ deployable.remoteDir + sep + localFileInfo.fileName();
if (QFileInfo(targetFilePath).exists()
&& MaemoGlobal::isFileNewerThan(targetFilePath, localFileInfo.lastModified())) {
continue;
}
sysRootDir.mkpath(deployable.remoteDir.mid(1));
QFile::remove(targetFilePath);
if (!QFile::copy(deployable.localFilePath, targetFilePath)) {
emit addOutput(tr("Sysroot installation failed: "
"Could not copy '%1' to '%2'. Continuing anyway.")
.arg(QDir::toNativeSeparators(deployable.localFilePath),
QDir::toNativeSeparators(targetFilePath)),
ErrorMessageOutput);
QString errorMsg;
MaemoGlobal::removeRecursively(targetFilePath, errorMsg);
if (!MaemoGlobal::copyRecursively(deployable.localFilePath,
targetFilePath, &errorMsg)) {
emit addOutput(tr("Sysroot installation failed: $1\n"
" Continuing anyway.").arg(errorMsg), ErrorMessageOutput);
}
QCoreApplication::processEvents();
if (fi.isCanceled()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment