mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
CUpdateSettings:: allow choose tmp(ramfs,TMPFS_MAGIC) as update dir
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6f07cbe3dd
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2013-10-08 (Tue, 08 Oct 2013)
Origin message was:
------------------
CUpdateSettings:: allow choose tmp(ramfs,TMPFS_MAGIC) as update dir
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1418,23 +1418,23 @@ void CFileBrowser::paintHead()
|
||||
free(l_name);
|
||||
}
|
||||
|
||||
bool chooserDir(char *setting_dir, bool test_dir, const char *action_str, size_t str_leng)
|
||||
bool chooserDir(char *setting_dir, bool test_dir, const char *action_str, size_t str_leng, bool allow_tmp)
|
||||
{
|
||||
std::string tmp_setting_dir = setting_dir;
|
||||
if(chooserDir(tmp_setting_dir, test_dir, action_str)){
|
||||
if(chooserDir(tmp_setting_dir, test_dir, action_str,allow_tmp)){
|
||||
strncpy(setting_dir,tmp_setting_dir.c_str(), str_leng);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool chooserDir(std::string &setting_dir, bool test_dir, const char *action_str)
|
||||
bool chooserDir(std::string &setting_dir, bool test_dir, const char *action_str, bool allow_tmp)
|
||||
{
|
||||
const char *wrong_str = "Wrong/unsupported";
|
||||
CFileBrowser b;
|
||||
b.Dir_Mode=true;
|
||||
if (b.exec(setting_dir.c_str())) {
|
||||
const char * newdir = b.getSelectedFile()->Name.c_str();
|
||||
if(test_dir && check_dir(newdir)){
|
||||
if(test_dir && check_dir(newdir,allow_tmp)){
|
||||
printf("%s %s dir %s\n",wrong_str ,action_str, newdir);
|
||||
return false;
|
||||
}else {
|
||||
|
Reference in New Issue
Block a user