From fc3d47cd341ba7cb2c048a9ddf220ce8b5107fd3 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 3 Jul 2016 23:48:44 +0100 Subject: [PATCH] More std::ifstream -> sg_ifstream --- src/Main/fg_commands.cxx | 3 ++- src/Scripting/NasalSys.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 77132cc99..ac0133834 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -295,7 +296,7 @@ do_load (const SGPropertyNode * arg) return false; } - ifstream input(validated_path.c_str()); + sg_ifstream input(SGPath::fromUtf8(validated_path)); if (input.good() && fgLoadFlight(input)) { input.close(); SG_LOG(SG_INPUT, SG_INFO, "Restored flight from " << file); diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 2d3d56868..20b97849c 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -726,7 +727,7 @@ static naRef f_parsexml(naContext c, naRef me, int argc, naRef* args) naRuntimeError(c, "parsexml(): access denied (unauthorized directory)"); return naNil(); } - std::ifstream input(file.c_str()); + sg_ifstream input(SGPath::fromUtf8(file)); NasalXMLVisitor visitor(c, argc, args); try { readXML(input, visitor);