diff --git a/simgear/io/untar.cxx b/simgear/io/untar.cxx index 39e40e88..59da58f0 100644 --- a/simgear/io/untar.cxx +++ b/simgear/io/untar.cxx @@ -31,6 +31,8 @@ #include #include #include +#include + #include #include #include @@ -592,7 +594,7 @@ public: outFile.open(path, std::ios::binary | std::ios::trunc | std::ios::out); if (outFile.fail()) { - throw sg_io_exception("failed to open output file for writing", path); + throw sg_io_exception("failed to open output file for writing:" + strutils::error_string(errno), path); } while (!eof) {