mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +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:
@@ -46,6 +46,7 @@
|
||||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <system/helpers.h>
|
||||
// yhttpd
|
||||
#include <yconfig.h>
|
||||
#include <ytypes_globals.h>
|
||||
@@ -179,16 +180,16 @@ std::string CmodSendfile::GetFileName(CyhookHandler *hh, std::string path, std::
|
||||
tmpfilename = path + "/" + filename;
|
||||
else
|
||||
tmpfilename = path + filename;
|
||||
if (access(std::string(hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename).c_str(), 4) == 0)
|
||||
if (access(hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename, R_OK) == 0)
|
||||
tmpfilename = hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename;
|
||||
else if (access(std::string(hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename + ".gz").c_str(), 4) == 0)
|
||||
else if (access(hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename + ".gz", R_OK) == 0)
|
||||
tmpfilename = hh->WebserverConfigList["WebsiteMain.override_directory"] + tmpfilename + ".gz";
|
||||
else if (access(std::string(hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename).c_str(), 4) == 0)
|
||||
else if (access(hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename, R_OK) == 0)
|
||||
tmpfilename = hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename;
|
||||
else if (access(std::string(hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename + ".gz").c_str(), 4) == 0)
|
||||
else if (access(hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename + ".gz", R_OK) == 0)
|
||||
tmpfilename = hh->WebserverConfigList["WebsiteMain.directory"] + tmpfilename + ".gz";
|
||||
#ifdef Y_CONFIG_FEATUE_SENDFILE_CAN_ACCESS_ALL
|
||||
else if(access(tmpfilename.c_str(),4) == 0)
|
||||
else if(access(tmpfilename,R_OK) == 0)
|
||||
;
|
||||
#endif
|
||||
else {
|
||||
|
Reference in New Issue
Block a user