From f8e4c2bae664f795e39610ab2c34373a331fcf16 Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 3 Nov 2020 21:26:03 +0000 Subject: [PATCH] Untar: log error details when output create fails Trying to understand why writing to the output files fails for some users. Sentry-Id: FLIGHTGEAR-SS --- simgear/io/untar.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {