SCP: Remove leading / from sim_dir_scan file names when glob isn't available
This commit is contained in:
parent
9d04c49641
commit
c0cda9ffd4
1 changed files with 2 additions and 1 deletions
3
scp.c
3
scp.c
|
@ -5917,10 +5917,11 @@ if (dir) {
|
||||||
if (fnmatch(MatchName, ent->d_name, 0))
|
if (fnmatch(MatchName, ent->d_name, 0))
|
||||||
continue;
|
continue;
|
||||||
#else
|
#else
|
||||||
|
/* only match exact name without fnmatch support */
|
||||||
if (strcmp(MatchName, ent->d_name) != 0)
|
if (strcmp(MatchName, ent->d_name) != 0)
|
||||||
continue;
|
continue;
|
||||||
#endif
|
#endif
|
||||||
sprintf (FileName, "%s/%s", DirName, ent->d_name);
|
sprintf (FileName, "%s%s", DirName, ent->d_name);
|
||||||
#endif
|
#endif
|
||||||
p_name = FileName + strlen (DirName);
|
p_name = FileName + strlen (DirName);
|
||||||
memset (&filestat, 0, sizeof (filestat));
|
memset (&filestat, 0, sizeof (filestat));
|
||||||
|
|
Loading…
Add table
Reference in a new issue