summaryrefslogtreecommitdiff
path: root/hscript
diff options
context:
space:
mode:
Diffstat (limited to 'hscript')
-rw-r--r--hscript/script.cc4
-rw-r--r--hscript/script_e.cc1
2 files changed, 3 insertions, 2 deletions
diff --git a/hscript/script.cc b/hscript/script.cc
index 6e436b7..59a799a 100644
--- a/hscript/script.cc
+++ b/hscript/script.cc
@@ -229,7 +229,7 @@ Script *Script::load(std::istream &sstream, const ScriptOptions &opts,
if(name == "/dev/stdin") {
curr_name = "<stdin>";
} else {
- curr_name = fs::canonical(fs::path(name));
+ curr_name = fs::canonical(fs::path(name)).native();
}
std::set<std::string> seen = {curr_name};
bool inherit = false;
@@ -270,7 +270,7 @@ Script *Script::load(std::istream &sstream, const ScriptOptions &opts,
fs::path better_path = fs::absolute(curr_name);
better_path.remove_filename();
better_path /= next_name;
- next_name = fs::absolute(better_path);
+ next_name = fs::absolute(better_path).native();
}
if(seen.find(next_name) != seen.end()) {
diff --git a/hscript/script_e.cc b/hscript/script_e.cc
index 87ade0f..2ad1a98 100644
--- a/hscript/script_e.cc
+++ b/hscript/script_e.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <fstream>
#include <set>
+#include <sstream>
#include <string>
#ifdef HAS_INSTALL_ENV
# include <parted/parted.h>