Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tinydir.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tinydir.h b/tinydir.h
index 23ea703..d99ced2 100644
--- a/tinydir.h
+++ b/tinydir.h
@@ -643,7 +643,11 @@ int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path)
}
/* Emulate the behavior of dirname by returning "." for dir name if it's
empty */
+#if ((defined _MSC_VER || defined __MINGW32__) && (defined UNICODE))
+ if (drive_buf[0] == '\0' && drive_buf[1] == '\0' && dir_name_buf[0] == '\0' && dir_name_buf[1] == '\0')
+#else
if (drive_buf[0] == '\0' && dir_name_buf[0] == '\0')
+#endif
{
_tinydir_strcpy(dir_name_buf, TINYDIR_STRING("."));
}