diff options
author | axel <axel@liljencrantz.se> | 2006-09-04 08:58:39 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-09-04 08:58:39 +1000 |
commit | a819c863eb81fad579d4e63ba92605f8766d8860 (patch) | |
tree | ff645b2efa790498b4ef30b53dc23daca25fbdc2 /parse_util.c | |
parent | 827c88e4a1ca2827d0c3f135e4ba1cd8b688ca80 (diff) |
Skip bug causing autoloader to sometimes use the wrong version of a function. Thanks to Martin Bähr and Mystilleef for the bug reports.
darcs-hash:20060903225839-ac50b-5b1f3d5f0b8c54b999836c3384c22c2a31c31bd0.gz
Diffstat (limited to 'parse_util.c')
-rw-r--r-- | parse_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parse_util.c b/parse_util.c index 6100f3be..fff0570e 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; } } |