mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-18 10:51:12 +02:00
overload access(2)
Conflicts: src/driver/pictureviewer/pictureviewer.cpp src/gui/components/cc_item_picture.cpp src/gui/movieplayer.cpp src/gui/osdlang_setup.cpp src/neutrino.cpp src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp src/nhttpd/yhttpd.cpp src/system/helpers.h src/system/setting_helpers.cpp
This commit is contained in:
@@ -392,7 +392,7 @@ void CFileBrowser::ChangeDir(const std::string & filename, int selection)
|
||||
std::string extension = file->Name.substr(ext_pos + 1, name.length() - ext_pos);
|
||||
if(strcasecmp(extension.c_str(), "ts") == 0) {
|
||||
std::string fname = file->Name.substr(0, ext_pos) + ".xml";
|
||||
if(access(fname.c_str(), F_OK) == 0)
|
||||
if(access(fname, F_OK) == 0)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@@ -1307,7 +1307,7 @@ std::string CMovieBrowser::getScreenshotName(std::string movie)
|
||||
ext = *it;
|
||||
ret.replace(found, ext.length(), ext);
|
||||
++it;
|
||||
if (!access(ret.c_str(), F_OK))
|
||||
if (!access(ret, F_OK))
|
||||
return ret;
|
||||
}
|
||||
return "";
|
||||
|
@@ -68,7 +68,7 @@ CNetworkService::CNetworkService(std::string cmd, std::string opts)
|
||||
enabled = false;
|
||||
|
||||
std::string file = TOUCH_BASE + cmd;
|
||||
if (!access(file.c_str(), F_OK))
|
||||
if (!access(file, F_OK))
|
||||
enabled = true;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ int CNetworkServiceSetup::showNetworkServiceSetup()
|
||||
std::string execute2 = "/sbin/" + services[i].cmd;
|
||||
|
||||
active = false;
|
||||
if ( !(access(execute1.c_str(), F_OK)) || !(access(execute2.c_str(), F_OK)) )
|
||||
if ( !(access(execute1, F_OK)) || !(access(execute2, F_OK)) )
|
||||
active = true;
|
||||
|
||||
if ( (services[i].name == "Telnet") && useinetd)
|
||||
|
@@ -46,6 +46,7 @@
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <xmlinterface.h>
|
||||
#include <system/helpers.h>
|
||||
#include <system/debug.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -145,10 +146,15 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
if (!strcmp(xmlGetName(search), "zone"))
|
||||
{
|
||||
std::string name = xmlGetAttribute(search, "name");
|
||||
// std::string zone = xmlGetAttribute(search, "zone");
|
||||
std::string zone = xmlGetAttribute(search, "zone");
|
||||
//printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
||||
tzSelect->addOption(name.c_str());
|
||||
found = true;
|
||||
if (access("/usr/share/zoneinfo/" + zone, R_OK))
|
||||
printf("[neutrino] timezone file '%s' not installed\n", zone.c_str());
|
||||
else
|
||||
{
|
||||
tzSelect->addOption(name);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
search = search->xmlNextNode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user