You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/03/01 06:53:23 UTC
cvs commit: apr/threadproc/win32 proc.c
wrowe 02/02/28 21:53:23
Modified: threadproc/win32 proc.c
Log:
Another test to 'flunk'. If the path is backslashed-terminated, we
don't know how applications might react. Convention is no trailing
backslash on Win32 cwd paths - so strip it back off when it occurs.
Revision Changes Path
1.64 +7 -2 apr/threadproc/win32/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/proc.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- proc.c 29 Jan 2002 05:49:21 -0000 1.63
+++ proc.c 1 Mar 2002 05:53:23 -0000 1.64
@@ -264,8 +264,13 @@
/* curr dir must be in native format, there are all sorts of bugs in
* the NT library loading code that flunk the '/' parsing test.
*/
- return apr_filepath_merge(&attr->currdir, NULL, dir,
- APR_FILEPATH_NATIVE, attr->cntxt);
+ apr_status_t rv = apr_filepath_merge(&attr->currdir, NULL, dir,
+ APR_FILEPATH_NATIVE, attr->cntxt);
+ if (rv == APR_SUCCESS) {
+ if (attr->currdir[strlen(attr->currdir) - 1] == '\\')
+ attr->currdir[strlen(attr->currdir) - 1] = '\0';
+ }
+ return rv;
}
APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,