projects
/
project
/
uhttpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2787be7
)
set the docroot to the current working directory if none is specified, fixes random...
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jan 2013 13:46:59 +0000
(14:46 +0100)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 26 Jan 2013 13:46:59 +0000
(14:46 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 8cf40274d5334b8733fab07aac160f64beb0b973..f88506cca812b5a947aed360912ab63dbacbb4ea 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-399,6
+399,14
@@
int main(int argc, char **argv)
return 1;
}
+ if (!conf.docroot) {
+ if (!realpath(".", uh_buf)) {
+ fprintf(stderr, "Error: Unable to determine work dir\n");
+ return 1;
+ }
+ conf.docroot = strdup(uh_buf);
+ }
+
#ifdef HAVE_TLS
if (n_tls) {
if (!tls_crt || !tls_key) {