apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom May <t...@planetarytramp.net>
Subject Re: [PATCH] docstrings on apr_filepath_merge() flags?
Date Thu, 18 Jul 2002 19:50:17 GMT
* Ben Collins-Sussman (sussman@collab.net) 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.
> 
> After some experimentation, I discovered that adding the
> APR_FILEPATH_NOTABSOLUTE flag prevented this behavior.
> 
> What annoys me is that I *deliberately* ignored this flag, because of
> its cryptic docstring:
> 
>    /** Fail apr_filepath_merge if the merged path is absolute */
>    #define APR_FILEPATH_NOTABSOLUTE    0x08
> 
> I read this docstring, and thought it was talking about somehow
> restricting the *inputs* to the function... like forcing the function
> to only accept absolute paths, or something.  It doesn't make a lot of
> sense.
> 
> Does anyone mind if I apply this patch?
> 
+1
-Thom

Mime
View raw message