Mercurial > hg > th-libs
diff th_file.c @ 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 | 5c3697bfefa3 |
children | a6e7a29ecd30 |
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;