mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
COPKGManager: fix path search for ../opkg/info
Since changed TARGET_PREFIX variable, path was wrong and causing possible long timeout while opening the manager window.
This commit is contained in:
@@ -655,12 +655,12 @@ bool COPKGManager::hasOpkgSupport()
|
|||||||
string COPKGManager::getInfoDir()
|
string COPKGManager::getInfoDir()
|
||||||
{
|
{
|
||||||
/* /opt/opkg/... is path in patched opkg, /var/lib/opkg/... is original path */
|
/* /opt/opkg/... is path in patched opkg, /var/lib/opkg/... is original path */
|
||||||
string dirs[] = {TARGET_PREFIX"/opt/opkg/info", TARGET_PREFIX"/var/lib/opkg/info"};
|
string dirs[] = {TARGET_PREFIX"/opt/opkg/info", TARGET_PREFIX"/var/lib/opkg/info", "/var/lib/opkg/info", "/opt/opkg/info"};
|
||||||
for (size_t i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
|
for (size_t i = 0; i < sizeof(dirs) / sizeof(dirs[0]); i++) {
|
||||||
if (access(dirs[i].c_str(), R_OK) == 0)
|
if (access(dirs[i].c_str(), R_OK) == 0)
|
||||||
return dirs[i];
|
return dirs[i];
|
||||||
|
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] InfoDir [%s] not found\n", __func__, __LINE__, dirs[i].c_str());
|
||||||
}
|
}
|
||||||
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] InfoDir not found\n", __func__, __LINE__);
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user