- patch from Denis Vlasenko to add and use bb_xchdir()
[oweals/busybox.git] / networking / httpd.c
index 0f6174140828e85d5b8a06625631394609f4f314..df280ccf554e2f6f88cb70004cde94ed06b3b373 100644 (file)
@@ -2077,9 +2077,7 @@ int httpd_main(int argc, char *argv[])
 #endif
 #endif
 
-  if(chdir(home_httpd)) {
-    bb_perror_msg_and_die("can`t chdir to %s", home_httpd);
-  }
+  bb_xchdir(home_httpd);
 #ifndef CONFIG_FEATURE_HTTPD_USAGE_FROM_INETD_ONLY
   server = openServer();
 # ifdef CONFIG_FEATURE_HTTPD_SETUID