From: Fredrik Tolf Date: Sun, 5 Sep 2010 01:50:28 +0000 (+0200) Subject: dirplex: Fixed findfile bug. X-Git-Tag: 0.1~26^2~1 X-Git-Url: http://dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=da262448ff1168521c3861610aeff8a42f5179a3 dirplex: Fixed findfile bug. --- diff --git a/src/dirplex.c b/src/dirplex.c index 86d2d9c..de9ecf2 100644 --- a/src/dirplex.c +++ b/src/dirplex.c @@ -459,6 +459,8 @@ static char *findfile(char *path, char *name, struct stat *sb) continue; if((p = strchr(dent->d_name, '.')) == NULL) continue; + if(p - dent->d_name != strlen(name)) + continue; if(strncmp(dent->d_name, name, strlen(name))) continue; fp = sprintf3("%s/%s", path, dent->d_name);