aboutsummaryrefslogtreecommitdiffhomepage
path: root/wildcard.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-12-26 08:00:44 +1000
committerGravatar axel <axel@liljencrantz.se>2005-12-26 08:00:44 +1000
commitb37eeb92ef73f68b51178ca17398d8b32d440da4 (patch)
treed669e8c834b139b23cc306a9b76e9032d5fc835d /wildcard.c
parentb6630b5087c0ebfe7f88ad648ebb4ad6614a21e1 (diff)
Fisx crash buh when completing string ending in backslash
darcs-hash:20051225220044-ac50b-b880ffe649d04ed1e5ec6786d0b59eed8068d182.gz
Diffstat (limited to 'wildcard.c')
-rw-r--r--wildcard.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wildcard.c b/wildcard.c
index 90386472..790591ab 100644
--- a/wildcard.c
+++ b/wildcard.c
@@ -317,8 +317,11 @@ static int test_flags( wchar_t *filename,
return 1;
struct stat buf;
- wstat( filename, &buf );
-
+ if( wstat( filename, &buf ) == -1 )
+ {
+ return 1;
+ }
+
if( S_IFDIR & buf.st_mode )
return 1;