mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
COPKGManager: remember for last selected update directory
Use g_settings to handle local package directory. Extra settings handler via gui for this directory is not intended. Default update directory is the same like in flash settings.
This commit is contained in:
@@ -90,7 +90,7 @@ COPKGManager::COPKGManager()
|
||||
list_installed_done = false;
|
||||
list_upgradeable_done = false;
|
||||
expert_mode = false;
|
||||
local_dir = g_settings.update_dir.c_str();
|
||||
local_dir = &g_settings.update_dir_opkg;
|
||||
CFileHelpers::createDir("/tmp/.opkg");
|
||||
}
|
||||
|
||||
@@ -148,11 +148,11 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
||||
CFileBrowser fileBrowser;
|
||||
fileBrowser.Filter = &fileFilter;
|
||||
|
||||
if (fileBrowser.exec(local_dir.c_str()))
|
||||
if (fileBrowser.exec((*local_dir).c_str()))
|
||||
{
|
||||
string pgk_name = fileBrowser.getSelectedFile()->Name;
|
||||
int r = execCmd(pkg_types[OM_INSTALL] + pgk_name, true, true);
|
||||
local_dir = fileBrowser.getCurrentDir();
|
||||
*local_dir = fileBrowser.getCurrentDir();
|
||||
if (r) {
|
||||
showError(g_Locale->getText(LOCALE_OPKG_FAILURE_INSTALL), strerror(errno), pgk_name);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user