cvs: /php4/sapi/servlet servlet.c

From: Date: Thu, 30 Mar 2000 23:23:58 +0000
Subject: cvs: /php4/sapi/servlet servlet.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-12923@lists.php.net to get a copy of this message
rubys Thu Mar 30 15:23:58 2000 EDT Modified files: /php4/sapi/servlet servlet.c Log: eliminate chdir if it is already virtual Index: php4/sapi/servlet/servlet.c diff -u php4/sapi/servlet/servlet.c:1.25 php4/sapi/servlet/servlet.c:1.26 --- php4/sapi/servlet/servlet.c:1.25 Thu Mar 30 14:56:34 2000 +++ php4/sapi/servlet/servlet.c Thu Mar 30 15:23:28 2000 @@ -365,9 +365,16 @@ * Parse the file */ SETSTRING( SG(request_info).path_translated, pathTranslated ); +#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. getcwd(cwd,MAXPATHLEN); file_handle.handle.fp = php_fopen_primary_script(); chdir(cwd); +#endif file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.type = ZEND_HANDLE_FP;

« previous php.version4 (#12923) next »