mirror of
https://github.com/open-simh/simh.git
synced 2026-02-26 17:03:56 +00:00
SCP: Fix file name parser to tolerate a name without any slashes in the path
This commit is contained in:
@@ -809,7 +809,10 @@ while ((c = strstr (fullpath, "/../"))) { /* process up directory climbing
|
||||
else
|
||||
break;
|
||||
}
|
||||
name = 1 + strrchr (fullpath, '/');
|
||||
if (!strrchr (fullpath, '/'))
|
||||
name = fullpath + strlen (fullpath);
|
||||
else
|
||||
name = 1 + strrchr (fullpath, '/');
|
||||
ext = strrchr (name, '.');
|
||||
if (ext == NULL)
|
||||
ext = name + strlen (name);
|
||||
|
||||
Reference in New Issue
Block a user