From 26a5fa94d66ce7d7ec2cadde950d086c933ddd69 Mon Sep 17 00:00:00 2001 From: Jan Horacek Date: Mon, 15 Nov 2021 17:17:27 +0100 Subject: [PATCH] Use native separator for paths. --- src/logging.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/logging.cpp b/src/logging.cpp index 66264f4..eb2850d 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "logging.h" #include "lib/termcolor.h" @@ -88,7 +89,9 @@ void Logger::prodLog(const QString& message, Mtb::LogLevel loglevel) { void Logger::prodInit() { std::string filename = QDateTime::currentDateTime().toString("yyyy-MM-dd_hh:mm:ss").toStdString() + ".log"; - this->prod.file = std::make_unique(this->prod.directory.toStdString() + "/" + filename); + this->prod.file = std::make_unique( + (this->prod.directory + QDir::separator()).toStdString() + filename + ); if (!this->prod.file->is_open()) { this->prod.file = nullptr; return;