diff --git a/test/extension/io/png/png_file_format_test.cpp b/test/extension/io/png/png_file_format_test.cpp index f5713ca094..c85dd79147 100644 --- a/test/extension/io/png/png_file_format_test.cpp +++ b/test/extension/io/png/png_file_format_test.cpp @@ -45,11 +45,11 @@ void test_file_format() if (fs::is_regular(dir_itr->status()) && (fs::extension(dir_itr->path()) == ".PNG")) { gil::rgb8_image_t img; - std::string filename = in + dir_itr->path().leaf().string(); + std::string filename = in + dir_itr->path().filename().string(); gil::read_and_convert_image(filename, img, gil::png_tag()); #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES - gil::write_view(png_out + fs::basename(dir_itr->path()) + ".png", + gil::write_view(png_out + dir_itr->path().stem().string() + ".png", gil::view(img), gil::png_tag()); #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES }