mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-12-04 14:46:37 -05:00
Fix for executable gophermaps in directories with spaces (bugreport from Black Rider)
This commit is contained in:
parent
42eb76376c
commit
1e5328f159
7
menu.c
7
menu.c
@ -269,6 +269,9 @@ int gophermap(state *st, char *mapfile, int depth)
|
||||
FILE *fp;
|
||||
struct stat file;
|
||||
char line[BUFSIZE];
|
||||
#ifdef HAVE_POPEN
|
||||
char buf[BUFSIZE];
|
||||
#endif
|
||||
char *selector;
|
||||
char *name;
|
||||
char *host;
|
||||
@ -299,7 +302,9 @@ int gophermap(state *st, char *mapfile, int depth)
|
||||
#ifdef HAVE_POPEN
|
||||
if (exe) {
|
||||
setenv_cgi(st, mapfile);
|
||||
if ((fp = popen(mapfile, "r")) == NULL) return OK;
|
||||
snprintf(buf, sizeof(buf), "'%s'", mapfile);
|
||||
|
||||
if ((fp = popen(buf, "r")) == NULL) return OK;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user