mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-24 09:31:34 +08:00
Update file_helper.h
This commit is contained in:
parent
4ca6991828
commit
fde12195ee
@ -129,8 +129,7 @@ public:
|
||||
if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1)
|
||||
return std::make_tuple(fname, spdlog::filename_t());
|
||||
|
||||
// treat casese like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
|
||||
//auto folder_index = fname.find('\\', ext_index);
|
||||
// treat casese like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
|
||||
auto folder_index = fname.rfind(details::os::folder_sep);
|
||||
if (folder_index != fname.npos && folder_index >= ext_index - 1)
|
||||
return std::make_tuple(fname, spdlog::filename_t());
|
||||
|
Loading…
Reference in New Issue
Block a user