fixed filename slash processing

This commit is contained in:
Rostislav Vasilikhin 2018-08-20 17:16:54 +03:00
parent c6f5b013ec
commit 378cf2ab63

View File

@ -801,10 +801,12 @@ TraceStorage* TraceManagerThreadLocal::getStorage() const
const char* pos = strrchr(filepath.c_str(), '/'); // extract filename
#ifdef _WIN32
if (!pos)
strrchr(filepath.c_str(), '\\');
pos = strrchr(filepath.c_str(), '\\');
#endif
if (!pos)
pos = filepath.c_str();
else
pos += 1; // fix to skip extra slash in filename beginning
msg.printf("#thread file: %s\n", pos);
global->put(msg);
storage.reset(new AsyncTraceStorage(filepath));