Skip to content

Commit

Permalink
fix: correctly create directories for paths with forward slashes on W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
Mixaill committed Jun 3, 2020
1 parent df9f1eb commit 678e4c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/path/sentry_path_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ sentry__path_create_dir_all(const sentry_path_t *path)
memcpy(p, path->path, len * sizeof(wchar_t));

for (ptr = p; *ptr; ptr++) {
if (*ptr == '\\' && ptr != p) {
if ((*ptr == L'\\' || *ptr == L'/') && ptr != p) {
*ptr = 0;
_TRY_MAKE_DIR;
*ptr = '\\';
*ptr = L'\\';
}
}
_TRY_MAKE_DIR;
Expand Down

0 comments on commit 678e4c3

Please sign in to comment.