Boost logo

Boost-Build :

Subject: Re: [Boost-build] Builtin GLOB is broken in Boost Engine (BJAM)
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-03-23 23:08:42


AMDG

On 03/23/2014 06:02 PM, Jose . wrote:
>
> A quick and dirty fix, that works for me, is this:
>
> static int canonicWindowsPath( char const * const path, int const
> path_length,
> string * const out )
> {
> ....
>
> saved_size = out->size;
> string_append_range( out, last_element, path + path_length );
>
> // if ( !missing_parent ) * // COMMENT THIS LINE*
> {
> char const * const n = last_element;
> ....
> }
>

The culprit appears to be r83892, which doesn't
correctly handle "." and ".." It should return
1, but instead it returns 0. The correct fix is
to add an else

...
    if ( !missing_parent )
    {
        char const * const n = last_element;
        int const n_length = path + path_length - n;
        if ( !( n_length == 1 && n[ 0 ] == '.' )
            && !( n_length == 2 && n[ 0 ] == '.' && n[ 1 ] == '.' ) )
        {
            ...
        }
        else /* HERE */
        {
            return 1;
        }
    }

I'll add this in master (along with some tests) tomorrow.

In Christ,
Steven Watanabe


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk