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:
martii
2013-06-30 17:00:34 +02:00
committed by [CST] Focus
parent d56b7da446
commit 81ca577fb8
14 changed files with 42 additions and 28 deletions

View File

@@ -9,6 +9,8 @@
#include <cstdlib>
#include <unistd.h>
#include <system/helpers.h>
// yhttpd
#include <yconfig.h>
#include <yhttpd.h>
@@ -109,9 +111,9 @@ std::string CLanguage::getTranslation(std::string id){
std::string CLanguage::getLanguageDir(void){
std::string tmpfilename = "/"+Cyhttpd::ConfigList["Language.directory"],dir="";
if( access(std::string(Cyhttpd::ConfigList["WebsiteMain.override_directory"] + tmpfilename).c_str(),4) == 0)
if( access(Cyhttpd::ConfigList["WebsiteMain.override_directory"] + tmpfilename,R_OK) == 0)
dir = Cyhttpd::ConfigList["WebsiteMain.override_directory"] + tmpfilename;
else if(access(std::string(Cyhttpd::ConfigList["WebsiteMain.directory"] + tmpfilename).c_str(),4) == 0)
else if(access(Cyhttpd::ConfigList["WebsiteMain.directory"] + tmpfilename,R_OK) == 0)
dir = Cyhttpd::ConfigList["WebsiteMain.directory"] + tmpfilename;
return dir;
}