summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/servlet/servlet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sapi/servlet/servlet.c b/sapi/servlet/servlet.c
index c1deeb6f3b..5142fca1e8 100644
--- a/sapi/servlet/servlet.c
+++ b/sapi/servlet/servlet.c
@@ -368,9 +368,11 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
#ifdef VIRTUAL_DIR
file_handle.handle.fp = php_fopen_primary_script();
#else
- // The java runtime doesn't like the working directory to be
- // changed, so save it and change it back as quickly as possible
- // in the hopes that Java doesn't notice.
+ /*
+ * The java runtime doesn't like the working directory to be
+ * changed, so save it and change it back as quickly as possible
+ * in the hopes that Java doesn't notice.
+ */
getcwd(cwd,MAXPATHLEN);
file_handle.handle.fp = php_fopen_primary_script();
chdir(cwd);