apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Collins-Sussman <suss...@collab.net>
Subject Re: [PATCH] docstrings on apr_filepath_merge() flags?
Date Thu, 18 Jul 2002 21:00:34 GMT
"William A. Rowe, Jr." <wrowe@rowe-clan.net> writes:

> At 02:47 PM 7/18/2002, Ben Collins-Sussman wrote:
> >I've got a path as a command-line argument, and I'm trying to convert
> >it to canonical case using apr_filepath_merge:
> >
> >    apr_err = apr_filepath_merge (&truenamed_target, NULL, raw_target,
> >                                  APR_FILEPATH_TRUENAME, pool);
> >
> >Unfortunately, this had the side-effect of converting a relative path
> >into an absolute path.
> Per the apr_filepath_merge docs [and if it's not there, it needs to be],
> passing a rootpath of NULL == the cwd.  Passing a rootpath of ""
> (empty) means merge raw_target to an empty path.
> Please try passing "" to the root path (meaning, merge the path to
> no characters) and see if that solves your problem.

Ah!  That did it!  Problem all fixed, the exact behavior I wanted.

Sorry for not reading the docs more closely.  Hmmm.  Actually, the
docs only mention the option of setting rootpath to NULL, not "".

View raw message