Merge pull request #1787 from sylveon/windows-separator-filenames

Better support for / separators on Windows, improve wchar filename coverage
This commit is contained in:
Gabi Melman
2021-01-12 00:29:08 +02:00
committed by GitHub
19 changed files with 220 additions and 169 deletions

View File

@@ -133,7 +133,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension
}
// treat cases like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
auto folder_index = fname.rfind(details::os::folder_sep);
auto folder_index = fname.find_last_of(details::os::folder_seps_filename);
if (folder_index != filename_t::npos && folder_index >= ext_index - 1)
{
return std::make_tuple(fname, filename_t());