mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Empty string should not be a directory.
This commit is contained in:
parent
5edf67bba8
commit
c492195ab1
2
file.c
2
file.c
@ -936,6 +936,8 @@ void dir_list_free(char **dir_list)
|
|||||||
bool path_is_directory(const char *path)
|
bool path_is_directory(const char *path)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
if (!*path) // In Win32, an empty string is apparently a directory ...
|
||||||
|
return false;
|
||||||
return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY;
|
return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY;
|
||||||
#elif defined(__CELLOS_LV2__) || defined(XENON)
|
#elif defined(__CELLOS_LV2__) || defined(XENON)
|
||||||
// Dummy
|
// Dummy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user