Skip to content

Commit

Permalink
COPKGManager: fix path search for ../opkg/info
Browse files Browse the repository at this point in the history
Since changed TARGET_PREFIX variable, path was wrong and causing
possible long timeout while opening the manager window.
  • Loading branch information
dbt1 committed Dec 23, 2017
1 parent a48d9dc commit 0135074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/opkg_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,12 @@ bool COPKGManager::hasOpkgSupport()
string COPKGManager::getInfoDir()
{
/* /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++) {
if (access(dirs[i].c_str(), R_OK) == 0)
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 "";
}

Expand Down

0 comments on commit 0135074

Please sign in to comment.