SCP: Use explicit filename compare when built without HAVE_GLOB & HAVE_FNMATCH
This commit is contained in:
parent
0fc41cb3bd
commit
2cd2f8c1d3
1 changed files with 3 additions and 2 deletions
5
scp.c
5
scp.c
|
@ -5575,9 +5575,7 @@ if (dir) {
|
|||
#endif
|
||||
t_offset FileSize;
|
||||
char FileName[PATH_MAX + 1];
|
||||
#if defined (HAVE_FNMATCH)
|
||||
char *MatchName = 1 + strrchr (cptr, '/');;
|
||||
#endif
|
||||
char *p_name;
|
||||
struct tm *local;
|
||||
#if defined (HAVE_GLOB)
|
||||
|
@ -5592,6 +5590,9 @@ if (dir) {
|
|||
#if defined (HAVE_FNMATCH)
|
||||
if (fnmatch(MatchName, ent->d_name, 0))
|
||||
continue;
|
||||
#else
|
||||
if (strcmp(MatchName, ent->d_name) != 0)
|
||||
continue;
|
||||
#endif
|
||||
sprintf (FileName, "%s/%s", DirName, ent->d_name);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue