comparison 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
comparison
equal deleted inserted replaced
670:b383f4e6ab89 671:45c2e474a997
167 // Start creating the directory stucture 167 // Start creating the directory stucture
168 do 168 do
169 { 169 {
170 // Split foremost path element out 170 // Split foremost path element out
171 for (save = 0, end = start; path[end] != 0; end++) 171 for (save = 0, end = start; path[end] != 0; end++)
172 if (path[end] == TH_DIR_SEPARATOR_CHR) 172 if (path[end] == '/' || path[end] == '\\')
173 { 173 {
174 save = path[end]; 174 save = path[end];
175 path[end] = 0; 175 path[end] = 0;
176 break; 176 break;
177 } 177 }