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
This commit is contained in:
James Turner 2020-11-03 21:26:03 +00:00 committed by James Turner
parent bf69827990
commit f8e4c2bae6

View File

@ -31,6 +31,8 @@
#include <simgear/sg_inlines.h>
#include <simgear/io/sg_file.hxx>
#include <simgear/misc/sg_dir.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/io/iostreams/sgstream.hxx>
#include <simgear/debug/logstream.hxx>
#include <simgear/package/unzip.h>
@ -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) {