diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-01 05:53:23 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-01 05:53:23 +0000 |
commit | a164d37ce1c89e04c44c20b43434e310687acfe7 (patch) | |
tree | e02e027b401b2525e64c62e10037d092c4ffbc84 | |
parent | 45de6f4d7496e1c288320db7f951bad5f09da446 (diff) | |
download | libapr-a164d37ce1c89e04c44c20b43434e310687acfe7.tar.gz |
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.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63073 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | threadproc/win32/proc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c index 18f02c84f..725ca615a 100644 --- a/threadproc/win32/proc.c +++ b/threadproc/win32/proc.c @@ -264,8 +264,13 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, /* 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, |