Skip to content

Commit

Permalink
Fix: repair bug in Filesystem::unique_path on Windows (#4211)
Browse files Browse the repository at this point in the history
Fixes #4210

Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz authored Mar 30, 2024
1 parent dd9eb9b commit 41eee61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libutil/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,11 @@ Filesystem::unique_path(string_view model)
for (size_t i = 0, e = modelStr.size(); i < e; ++i)
if (name[i] == '%')
name[i] = chrs[pick(rg)];
# if defined(_WIN32)
if (!exists(Strutil::utf16_to_utf8(name)))
# else
if (!exists(name))
# endif
break;
}
# if defined(_WIN32)
Expand Down

0 comments on commit 41eee61

Please sign in to comment.