mirror of
https://github.com/simh/simh.git
synced 2026-01-14 07:39:29 +00:00
SCP: Use explicit filename compare when built without HAVE_GLOB & HAVE_FNMATCH
This commit is contained in:
parent
0fc41cb3bd
commit
2cd2f8c1d3
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…
x
Reference in New Issue
Block a user