From f222c6774f7a723a99f570229e5180de54d7200f Mon Sep 17 00:00:00 2001 From: Victor Olin Date: Fri, 24 Mar 2023 09:56:03 +0100 Subject: [PATCH] Quick patch for Valter --- src/GC/lib/profiler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/GC/lib/profiler.cpp b/src/GC/lib/profiler.cpp index e346f8d..5d9a216 100644 --- a/src/GC/lib/profiler.cpp +++ b/src/GC/lib/profiler.cpp @@ -11,6 +11,8 @@ #include "event.hpp" #include "profiler.hpp" +#define MAC_OS + namespace GC { /** @@ -153,8 +155,8 @@ namespace GC } /** - * This function retrieves the current path of the - * executable to use for log files. + * This function retrieves the path to the folder + * of the executable to use for log files. * * @returns The path to the logs folder. * @@ -163,6 +165,7 @@ namespace GC */ std::string Profiler::get_log_folder() { +#ifndef MAC_OS char buffer[1024]; // chars read from path ssize_t len = readlink("/proc/self/exe", buffer, sizeof(buffer)-1); @@ -181,7 +184,9 @@ namespace GC // remove filename size_t last_slash = path.find_last_of('/'); std::string folder = path.substr(0, last_slash); - +#else + auto folder = std::string("/Users/valtermiari/Desktop/DV/Bachelors/code/language/src/GC/tests"); return folder + "/logs"; +#endif } } \ No newline at end of file