Don't rely on local pkg dir when reloading library deps
Since 11f1849fde
the cache dir is also set as local pkg dir
so we cannot rely on packages really existing there.
This commit is contained in:
parent
152ee1dde0
commit
08421fa719
|
@ -178,8 +178,8 @@ bool ReloadLibraryDependencies::addRelevantPackage(LibPkg::StorageID packageID,
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
const auto &fileName = packageInfo->fileName;
|
const auto &fileName = packageInfo->fileName;
|
||||||
const auto &arch = packageInfo->arch;
|
const auto &arch = packageInfo->arch;
|
||||||
if (!db->localPkgDir.empty()) {
|
if (!db->localPkgDir.empty() && std::filesystem::file_size(cachePath = db->localPkgDir % '/' + fileName, ec) && !ec) {
|
||||||
path = db->localPkgDir % '/' + fileName;
|
path = std::move(cachePath);
|
||||||
} else if (std::filesystem::file_size(cachePath = m_cacheDir + fileName, ec) && !ec) {
|
} else if (std::filesystem::file_size(cachePath = m_cacheDir + fileName, ec) && !ec) {
|
||||||
path = std::move(cachePath);
|
path = std::move(cachePath);
|
||||||
} else if (std::filesystem::file_size(cachePath = m_cacheDir % arch % '/' + fileName, ec) && !ec) {
|
} else if (std::filesystem::file_size(cachePath = m_cacheDir % arch % '/' + fileName, ec) && !ec) {
|
||||||
|
|
Loading…
Reference in New Issue