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 2006/07/24 06:27:33 UTC
svn commit: r424900 - /apr/apr/trunk/test/testnames.c
Author: wrowe
Date: Sun Jul 23 21:27:27 2006
New Revision: 424900
URL: http://svn.apache.org/viewvc?rev=424900&view=rev
Log:
Revert my last commit. I've determined that data becomes data, while
data/ remains data/. ../../.. should observe the same behavior, so this
is effectively a bug, even if it has no negative impact.
Modified:
apr/apr/trunk/test/testnames.c
Modified: apr/apr/trunk/test/testnames.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testnames.c?rev=424900&r1=424899&r2=424900&view=diff
==============================================================================
--- apr/apr/trunk/test/testnames.c (original)
+++ apr/apr/trunk/test/testnames.c Sun Jul 23 21:27:27 2006
@@ -100,7 +100,7 @@
"../../..", APR_FILEPATH_TRUENAME, p);
ABTS_PTR_NOTNULL(tc, dstpath);
ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
- ABTS_STR_EQUAL(tc, "../../../", dstpath);
+ ABTS_STR_EQUAL(tc, "../../..", dstpath);
rv = apr_filepath_merge(&dstpath, "",
"../../../", APR_FILEPATH_TRUENAME, p);
Re: svn commit: r424900 - /apr/apr/trunk/test/testnames.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Joe Orton wrote:
> On Mon, Jul 24, 2006 at 04:27:33AM -0000, William Rowe wrote:
>> Author: wrowe
>> Date: Sun Jul 23 21:27:27 2006
>> New Revision: 424900
>>
>> URL: http://svn.apache.org/viewvc?rev=424900&view=rev
>> Log:
>>
>> Revert my last commit. I've determined that data becomes data, while
>> data/ remains data/. ../../.. should observe the same behavior, so this
>> is effectively a bug, even if it has no negative impact.
>
> The Unix implementation will always append a trailing slash in this
> case, it seems. The APR_FILEPATH_TRUENAME documentation appears to
> suggest it should too; is this a bug?
Let's verify the assumption that TRUENAME will append a slash to a dir name,
and if so, TRUENAME should ignore the absence of a trailing slash and always
append one.
In the non-truename case, I'm suggesting that if foo/bar is returned as
foo/bar, then ../.. should also be returned as ../.. - would you agree?
Interesting side effects; foo/bar/.. becomes foo where it currently becomes
foo/ if I finish this thought and also touch the other side of the ../
handling code.
Bill
Re: svn commit: r424900 - /apr/apr/trunk/test/testnames.c
Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jul 24, 2006 at 04:27:33AM -0000, William Rowe wrote:
> Author: wrowe
> Date: Sun Jul 23 21:27:27 2006
> New Revision: 424900
>
> URL: http://svn.apache.org/viewvc?rev=424900&view=rev
> Log:
>
> Revert my last commit. I've determined that data becomes data, while
> data/ remains data/. ../../.. should observe the same behavior, so this
> is effectively a bug, even if it has no negative impact.
The Unix implementation will always append a trailing slash in this
case, it seems. The APR_FILEPATH_TRUENAME documentation appears to
suggest it should too; is this a bug?
>
> Modified:
> apr/apr/trunk/test/testnames.c
>
> Modified: apr/apr/trunk/test/testnames.c
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testnames.c?rev=424900&r1=424899&r2=424900&view=diff
> ==============================================================================
> --- apr/apr/trunk/test/testnames.c (original)
> +++ apr/apr/trunk/test/testnames.c Sun Jul 23 21:27:27 2006
> @@ -100,7 +100,7 @@
> "../../..", APR_FILEPATH_TRUENAME, p);
> ABTS_PTR_NOTNULL(tc, dstpath);
> ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
> - ABTS_STR_EQUAL(tc, "../../../", dstpath);
> + ABTS_STR_EQUAL(tc, "../../..", dstpath);
>
> rv = apr_filepath_merge(&dstpath, "",
> "../../../", APR_FILEPATH_TRUENAME, p);
>