From dbe3fdd1627fe97066eeea98f283ed4b38810654 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Fri, 2 Dec 2011 18:49:07 +0000 Subject: [PATCH] Adjust search to find generated targets without regard to case, on NT. [SVN r75776] --- v2/engine/search.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/v2/engine/search.c b/v2/engine/search.c index 76d5acaaa..267933f0c 100644 --- a/v2/engine/search.c +++ b/v2/engine/search.c @@ -151,6 +151,7 @@ search( BINDING b, *ba = &b; file_info_t *ff; OBJECT * key; + OBJECT * test_path; f->f_root.ptr = object_str( varlist->value ); f->f_root.len = strlen( object_str( varlist->value ) ); @@ -161,7 +162,9 @@ search( if ( DEBUG_SEARCH ) printf( "search %s: %s\n", object_str( target ), buf->value ); - key = object_new( buf->value ); + test_path = object_new( buf->value ); + key = path_as_key( test_path ); + object_free( test_path ); ff = file_query( key ); timestamp( key, time ); @@ -221,14 +224,15 @@ search( { BINDING b; BINDING * ba = &b; - b.binding = boundname; + OBJECT * key = path_as_key( boundname ); + b.binding = key; b.target = target; /* CONSIDER: we probably should issue a warning is another file is explicitly bound to the same location. This might break compatibility, though. */ - if ( hashenter( explicit_bindings, (HASHDATA * *)&ba ) ) + if ( !hashenter( explicit_bindings, (HASHDATA * *)&ba ) ) { - ba->binding = object_copy( boundname ); + object_free( key ); } }