mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
retro_vfs_opendir_impl - one less unnecessary strlen for Win32
This commit is contained in:
parent
72eb52a5bc
commit
fcbc71fef8
@ -1015,7 +1015,6 @@ libretro_vfs_implementation_dir *retro_vfs_opendir_impl(
|
||||
const char *name, bool include_hidden)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
unsigned path_len;
|
||||
char path_buf[1024];
|
||||
size_t copied = 0;
|
||||
#if defined(LEGACY_WIN32)
|
||||
@ -1038,16 +1037,13 @@ libretro_vfs_implementation_dir *retro_vfs_opendir_impl(
|
||||
rdir->orig_path = strdup(name);
|
||||
|
||||
#if defined(_WIN32)
|
||||
path_buf[0] = '\0';
|
||||
path_len = strlen(name);
|
||||
|
||||
copied = strlcpy(path_buf, name, sizeof(path_buf));
|
||||
|
||||
/* Non-NT platforms don't like extra slashes in the path */
|
||||
if (name[path_len - 1] != '\\')
|
||||
path_buf[copied++] = '\\';
|
||||
if (path_buf[copied - 1] != '\\')
|
||||
path_buf [copied++] = '\\';
|
||||
|
||||
path_buf[copied] = '*';
|
||||
path_buf[copied ] = '*';
|
||||
path_buf[copied+1] = '\0';
|
||||
|
||||
#if defined(LEGACY_WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user