Make sure that if everything fails, to check /etc/dc for thedc-binary.
This commit is contained in:
@@ -124,18 +124,22 @@ std::unique_ptr<QString> dcCandidateToInstall(QString const &dcDirectory,
|
|||||||
dcDir = customerRepoDcDir();
|
dcDir = customerRepoDcDir();
|
||||||
} else {
|
} else {
|
||||||
dcDir = dcDirectory;
|
dcDir = dcDirectory;
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!rootDir.endsWith("/etc/dc") && !rootDir.endsWith("/etc/dc/")) {
|
||||||
if (dcDirectory.isEmpty()) {
|
if (dcDirectory.isEmpty()) {
|
||||||
dcDir = QDir::cleanPath(rootDir + QDir::separator() + customerRepoDcDir());
|
dcDir = QDir::cleanPath(rootDir + QDir::separator() + "etc/dc/");
|
||||||
} else {
|
} else {
|
||||||
dcDir = QDir::cleanPath(rootDir + QDir::separator() + dcDirectory);
|
dcDir = QDir::cleanPath(rootDir + QDir::separator() + dcDirectory);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dcDir = QDir::cleanPath(rootDir + QDir::separator());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dcDir.exists()) {
|
if (dcDir.exists()) {
|
||||||
qCritical() << __func__ << __LINE__ << dcDir;
|
|
||||||
|
qInfo() << "use" << dcDir.absolutePath() << "as directory (containing dc-binary)";
|
||||||
|
|
||||||
QFileInfoList fileInfoList =
|
QFileInfoList fileInfoList =
|
||||||
dcDir.entryInfoList(QStringList("*.bin"),
|
dcDir.entryInfoList(QStringList("*.bin"),
|
||||||
@@ -143,7 +147,6 @@ std::unique_ptr<QString> dcCandidateToInstall(QString const &dcDirectory,
|
|||||||
|
|
||||||
QFileInfo dc2cbin{dcDir.absoluteFilePath("dc2c.bin")};
|
QFileInfo dc2cbin{dcDir.absoluteFilePath("dc2c.bin")};
|
||||||
|
|
||||||
|
|
||||||
if (dc2cbin.exists()) {
|
if (dc2cbin.exists()) {
|
||||||
|
|
||||||
QCryptographicHash md5gen(QCryptographicHash::Md5);
|
QCryptographicHash md5gen(QCryptographicHash::Md5);
|
||||||
@@ -175,7 +178,11 @@ std::unique_ptr<QString> dcCandidateToInstall(QString const &dcDirectory,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCritical() << __func__ << __LINE__ << dcDir << "does not exist";
|
qCritical() << dcDir.absolutePath() << "does not exist";
|
||||||
|
if (dcDir.absolutePath() != QDir("/etc/dc/").absolutePath()) {
|
||||||
|
qInfo() << __func__ << __LINE__ << "Try /etc/dc/";
|
||||||
|
return dcCandidateToInstall("/etc/dc/", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dcCandidate;
|
return dcCandidate;
|
||||||
|
Reference in New Issue
Block a user