From a819c863eb81fad579d4e63ba92605f8766d8860 Mon Sep 17 00:00:00 2001 From: axel Date: Mon, 4 Sep 2006 08:58:39 +1000 Subject: [PATCH] =?UTF-8?q?Skip=20bug=20causing=20autoloader=20to=20someti?= =?UTF-8?q?mes=20use=20the=20wrong=20version=20of=20a=20function.=20Thanks?= =?UTF-8?q?=20to=20Martin=20B=C3=A4hr=20and=20Mystilleef=20for=20the=20bug?= =?UTF-8?q?=20reports.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20060903225839-ac50b-5b1f3d5f0b8c54b999836c3384c22c2a31c31bd0.gz --- parse_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse_util.c b/parse_util.c index 6100f3be4..fff0570e6 100644 --- a/parse_util.c +++ b/parse_util.c @@ -728,7 +728,7 @@ static int path_util_load_internal( const wchar_t *cmd, time_t *tm; int i; int reloaded = 0; - + /* Get modification time of file */ @@ -770,6 +770,7 @@ static int path_util_load_internal( const wchar_t *cmd, wchar_t *next = (wchar_t *)al_get( path_list, i ); sb_clear( path ); sb_append2( path, next, L"/", cmd, L".fish", (void *)0 ); + if( (wstat( (wchar_t *)path->buff, &buf )== 0) && (waccess( (wchar_t *)path->buff, R_OK ) == 0) ) { @@ -802,8 +803,8 @@ static int path_util_load_internal( const wchar_t *cmd, exec_subshell( src_cmd, 0 ); free(src_cmd); reloaded = 1; - break; } + break; } }