changeset 671:45c2e474a997

Support both UNIX and DOS/Windows path separators in th_mkdir_path().
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Feb 2020 07:42:16 +0200
parents b383f4e6ab89
children 1d4d22c862ed
files th_file.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/th_file.c	Tue Jan 28 21:28:02 2020 +0200
+++ b/th_file.c	Mon Feb 24 07:42:16 2020 +0200
@@ -169,7 +169,7 @@
     {
         // Split foremost path element out
         for (save = 0, end = start; path[end] != 0; end++)
-        if (path[end] == TH_DIR_SEPARATOR_CHR)
+        if (path[end] == '/' || path[end] == '\\')
         {
             save = path[end];
             path[end] = 0;