mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(task_decompress.c) Use path_is_directory
This commit is contained in:
parent
25d63c3167
commit
9095399aa8
@ -21,6 +21,7 @@
|
||||
#include <string/stdstring.h>
|
||||
#include <file/file_path.h>
|
||||
#include <file/file_extract.h>
|
||||
#include <retro_stat.h>
|
||||
|
||||
#include "tasks.h"
|
||||
#include "../verbosity.h"
|
||||
@ -47,7 +48,7 @@ static int file_decompressed_subdir(const char *name, const char *valid_exts,
|
||||
decompress_state_t *dec = (decompress_state_t*)userdata;
|
||||
|
||||
/* Ignore directories. */
|
||||
if (name[strlen(name) - 1] == '/' || name[strlen(name) - 1] == '\\')
|
||||
if (path_is_directory(name))
|
||||
goto next_file;
|
||||
|
||||
if (strstr(name, dec->subdir) != name)
|
||||
@ -86,7 +87,7 @@ static int file_decompressed(const char *name, const char *valid_exts,
|
||||
decompress_state_t *dec = (decompress_state_t*)userdata;
|
||||
|
||||
/* Ignore directories. */
|
||||
if (name[strlen(name) - 1] == '/' || name[strlen(name) - 1] == '\\')
|
||||
if (path_is_directory(name))
|
||||
goto next_file;
|
||||
|
||||
/* Make directory */
|
||||
|
Loading…
x
Reference in New Issue
Block a user