From 526aaffec33c8b0fd468413d25abe76e8fb3a9ac Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 6 Oct 2015 23:04:37 +0100 Subject: [PATCH] Fix logging the file name on windows --- src/console/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/console/mod.rs b/src/console/mod.rs index baeb435..9b36f95 100644 --- a/src/console/mod.rs +++ b/src/console/mod.rs @@ -202,7 +202,7 @@ impl Console { } fn log(&mut self, record: &log::LogRecord) { - let mut file = record.location().file(); + let mut file = &record.location().file().replace("\\", "/")[..]; if let Some(pos) = file.rfind("src/") { file = &file[pos + 4..]; }