Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
romange committed May 23, 2021
1 parent 4f4190a commit 67d9e41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vlog_is_on.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ bool InitVLOG3__(SiteFlag* site_flag, int32* level_default,

// Get basename for file
const char* base = strrchr(fname, '/');

#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif

base = base ? (base+1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length = base_end ? size_t(base_end - base) : strlen(base);
Expand Down

0 comments on commit 67d9e41

Please sign in to comment.