apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Collins-Sussman <suss...@collab.net>
Subject [PATCH] docstrings on apr_filepath_merge() flags?
Date Thu, 18 Jul 2002 19:47:36 GMT

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 */

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

Does anyone mind if I apply this patch?

Index: apr_file_info.h
RCS file: /home/cvs/apr/include/apr_file_info.h,v
retrieving revision 1.32
diff -u -r1.32 apr_file_info.h
--- apr_file_info.h	20 Mar 2002 08:54:43 -0000	1.32
+++ apr_file_info.h	18 Jul 2002 19:46:59 -0000
@@ -299,10 +299,10 @@
-/** Fail apr_filepath_merge if the merged path is relative */
+/** Return an absolute merged path */
-/** Fail apr_filepath_merge if the merged path is absolute */
+/** Return a relative merged path */
 /** Return the file system's native path format (e.g. path delimiters

View raw message