Skip to content

Commit 4d35ce1

Browse files
committed
Windows fill_pathname_parent_dir_name start slash correction
1 parent 8618e55 commit 4d35ce1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libretro-common/file/file_path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ size_t fill_pathname_parent_dir_name(char *s, const char *in_dir, size_t len)
500500
if (in_dir && in_dir[1])
501501
{
502502
/* If path starts with an slash, eliminate it. */
503-
if (path_is_absolute(in_dir))
503+
if (path_is_absolute(in_dir) || in_dir[0] == '\\')
504504
_len = strlcpy(s, in_dir + 1, len);
505505
else
506506
_len = strlcpy(s, in_dir, len);

0 commit comments

Comments
 (0)