From 01b770e5f171a440f01cb9a9b2d974e9c8c82690 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Nov 2023 04:10:04 +0100 Subject: a --- anim-crop-tool/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'anim-crop-tool') diff --git a/anim-crop-tool/main.cpp b/anim-crop-tool/main.cpp index 52fd2c6b..9cd3bcd4 100644 --- a/anim-crop-tool/main.cpp +++ b/anim-crop-tool/main.cpp @@ -1,6 +1,7 @@ #include "atlas.hpp" #include "compat/assert.hpp" #include "compat/defs.hpp" +#include "compat/strerror.hpp" #include "compat/sysexits.hpp" #include "compat/fix-argv0.hpp" #include "loader/loader.hpp" @@ -270,8 +271,9 @@ int main(int argc, char** argv) : anim_info.object_name; if (auto pathname = Path::join(opts.output_dir, (base_name + ".png")); !atlas.dump(pathname)) { - Error{} << "error: failed writing image to" << pathname << ":" - << std::strerror(errno); // NOLINT(concurrency-mt-unsafe) + char errbuf[128]; + auto errstr = get_error_string(errbuf); + ERR_nospace << "error: failed writing image to '" << pathname << "': " << errstr; return EX_CANTCREAT; } anim_info.pixel_size = Vector2ui(atlas.size()); -- cgit v1.2.3