mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
helpers: rename get_path() to proper check_var()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 48a7068c93
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-11 (Thu, 11 Aug 2016)
Origin message was:
------------------
- helpers: rename get_path() to proper check_var()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -97,7 +97,7 @@ void wakeup_hdd(const char *hdd_dir, bool msg)
|
|||||||
msg = false;
|
msg = false;
|
||||||
if(msg)
|
if(msg)
|
||||||
loadBox.paint();
|
loadBox.paint();
|
||||||
std::string s = get_path("/bin/wakeup.sh");
|
std::string s = check_var("/bin/wakeup.sh");
|
||||||
my_system(2,s.c_str(),hdd_dir);
|
my_system(2,s.c_str(),hdd_dir);
|
||||||
|
|
||||||
if (!g_settings.hdd_wakeup) {
|
if (!g_settings.hdd_wakeup) {
|
||||||
@@ -1202,16 +1202,16 @@ std::string filehash(const char *file)
|
|||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string get_path(const char *path)
|
std::string check_var(const char *file)
|
||||||
{
|
{
|
||||||
if(path[0] == '/' && strstr(path,"/var") == 0)
|
std::string var = "/var";
|
||||||
|
if(file[0] == '/' && strstr(file, var.c_str()) == 0)
|
||||||
{
|
{
|
||||||
std::string varc = "/var";
|
std::string varfile = var + file;
|
||||||
varc += path;
|
|
||||||
|
|
||||||
if(file_exists(varc.c_str()))
|
if (file_exists(varfile))
|
||||||
return varc;
|
return varfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return file;
|
||||||
}
|
}
|
||||||
|
@@ -124,7 +124,7 @@ std::string Lang2ISO639_1(std::string& lang);
|
|||||||
//NI
|
//NI
|
||||||
int getpidof(const char *process);
|
int getpidof(const char *process);
|
||||||
std::string filehash(const char * file);
|
std::string filehash(const char * file);
|
||||||
std::string get_path(const char * path);
|
std::string check_var(const char * file);
|
||||||
inline bool file_exists(const std::string file) { return file_exists(file.c_str()); }
|
inline bool file_exists(const std::string file) { return file_exists(file.c_str()); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user