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
|
#endif
|
||||||
t_offset FileSize;
|
t_offset FileSize;
|
||||||
char FileName[PATH_MAX + 1];
|
char FileName[PATH_MAX + 1];
|
||||||
#if defined (HAVE_FNMATCH)
|
|
||||||
char *MatchName = 1 + strrchr (cptr, '/');;
|
char *MatchName = 1 + strrchr (cptr, '/');;
|
||||||
#endif
|
|
||||||
char *p_name;
|
char *p_name;
|
||||||
struct tm *local;
|
struct tm *local;
|
||||||
#if defined (HAVE_GLOB)
|
#if defined (HAVE_GLOB)
|
||||||
|
@ -5592,6 +5590,9 @@ if (dir) {
|
||||||
#if defined (HAVE_FNMATCH)
|
#if defined (HAVE_FNMATCH)
|
||||||
if (fnmatch(MatchName, ent->d_name, 0))
|
if (fnmatch(MatchName, ent->d_name, 0))
|
||||||
continue;
|
continue;
|
||||||
|
#else
|
||||||
|
if (strcmp(MatchName, ent->d_name) != 0)
|
||||||
|
continue;
|
||||||
#endif
|
#endif
|
||||||
sprintf (FileName, "%s/%s", DirName, ent->d_name);
|
sprintf (FileName, "%s/%s", DirName, ent->d_name);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue