mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Only look for admin include if no local found
This switches the behaviour introduced with the last commit so that now the admin folder is only checked for includes if in the specified path none is found.
This commit is contained in:
parent
5b416b311c
commit
0709b4e66d
@ -207,16 +207,19 @@ static xmlDocPtr custom_loader(const xmlChar *URI,
|
||||
xsltStylesheet *c;
|
||||
ice_config_t *config;
|
||||
final_URI = xmlStrdup(URI);
|
||||
struct stat file;
|
||||
switch (type) {
|
||||
/* In case an include is loaded */
|
||||
case XSLT_LOAD_STYLESHEET:
|
||||
/* Not look in admindir if the include file exists */
|
||||
if (stat((char *)URI, &file) == 0)
|
||||
break;
|
||||
c = (xsltStylesheet *) ctxt;
|
||||
/* Check if we actually have context/path */
|
||||
if (ctxt == NULL || c->doc->URL == NULL)
|
||||
break;
|
||||
rel_path = xmlBuildRelativeURI(URI, c->doc->URL);
|
||||
if (rel_path != NULL && admin_path != NULL) {
|
||||
struct stat file;
|
||||
fn = xmlBuildURI(rel_path, admin_path);
|
||||
if (fn != NULL && stat((char *)fn, &file) == 0) {
|
||||
final_URI = fn;
|
||||
|
Loading…
Reference in New Issue
Block a user