From 67442742c5a3ac370def935c039f5095b6447fc3 Mon Sep 17 00:00:00 2001 From: sorgelig Date: Thu, 10 Jan 2019 22:59:10 +0800 Subject: [PATCH] Fix locating the file in catalog. --- file_io.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/file_io.cpp b/file_io.cpp index 059bef4..576ad21 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -1035,7 +1035,7 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons if (mode == SCANF_INIT) { file_name[0] = 0; - if (!isPathDirectory(path)) + if (isPathRegularFile(path)) { char *p = strrchr(path, '/'); if (p) @@ -1048,8 +1048,6 @@ int ScanDirectory(char* path, int mode, const char *extension, int options, cons strcpy(file_name, path); path[0] = 0; } - - if (!isPathRegularFile(path)) file_name[0] = 0; } if (!isPathDirectory(path))