apple has problem with <filesystem>, temporary disable it
This commit is contained in:
13
ml_util.cpp
13
ml_util.cpp
@@ -4,11 +4,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
// #include <filesystem>
|
||||
|
||||
std::vector<std::string> 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user