From 55ee694f6f49e0251d0c68934bd3cd1086718f26 Mon Sep 17 00:00:00 2001 From: VaclavT Date: Tue, 8 Mar 2022 17:47:21 +0100 Subject: [PATCH] apple has problem with , temporary disable it --- ml_util.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ml_util.cpp b/ml_util.cpp index f8d646c..740729d 100644 --- a/ml_util.cpp +++ b/ml_util.cpp @@ -4,11 +4,13 @@ #include #include #include -#include #include +// #include std::vector commands {}; +// kryplove z applu a jejich problemy s filesystemem +/* std::string get_history_file_dir() { std::string filename{".ml_history.txt"}; const char *t = std::getenv("HOME"); @@ -16,6 +18,15 @@ std::string get_history_file_dir() { if (t == nullptr) return std::filesystem::temp_directory_path() / filename; else return std::filesystem::path(std::string{t}) /filename; } + */ + +std::string get_history_file_dir() { + std::string file{"/.ml_history.txt"}; + const char *t = std::getenv("HOME"); + + if (t == nullptr) return "/tmp/" + file; + else return std::string{t} + "/" + file; +} MlEnvironment * repl_env = nullptr;