mirror of
https://github.com/opencv/opencv.git
synced 2025-07-26 07:07:37 +08:00
fixed filename slash processing
This commit is contained in:
parent
c6f5b013ec
commit
378cf2ab63
@ -801,10 +801,12 @@ TraceStorage* TraceManagerThreadLocal::getStorage() const
|
|||||||
const char* pos = strrchr(filepath.c_str(), '/'); // extract filename
|
const char* pos = strrchr(filepath.c_str(), '/'); // extract filename
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!pos)
|
if (!pos)
|
||||||
strrchr(filepath.c_str(), '\\');
|
pos = strrchr(filepath.c_str(), '\\');
|
||||||
#endif
|
#endif
|
||||||
if (!pos)
|
if (!pos)
|
||||||
pos = filepath.c_str();
|
pos = filepath.c_str();
|
||||||
|
else
|
||||||
|
pos += 1; // fix to skip extra slash in filename beginning
|
||||||
msg.printf("#thread file: %s\n", pos);
|
msg.printf("#thread file: %s\n", pos);
|
||||||
global->put(msg);
|
global->put(msg);
|
||||||
storage.reset(new AsyncTraceStorage(filepath));
|
storage.reset(new AsyncTraceStorage(filepath));
|
||||||
|
Loading…
Reference in New Issue
Block a user