SCP: Fix file name parser to tolerate a name without any slashes in the path
This commit is contained in:
parent
a2300fcf95
commit
7e58080fb5
1 changed files with 4 additions and 1 deletions
|
@ -809,6 +809,9 @@ while ((c = strstr (fullpath, "/../"))) { /* process up directory climbing
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (!strrchr (fullpath, '/'))
|
||||||
|
name = fullpath + strlen (fullpath);
|
||||||
|
else
|
||||||
name = 1 + strrchr (fullpath, '/');
|
name = 1 + strrchr (fullpath, '/');
|
||||||
ext = strrchr (name, '.');
|
ext = strrchr (name, '.');
|
||||||
if (ext == NULL)
|
if (ext == NULL)
|
||||||
|
|
Loading…
Add table
Reference in a new issue