libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit e1326fb5ed70d7cf874a979ebb6d4201fb80fd99
parent 901e118c959a94d7b68e4391654d85669b4673d4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  3 Jun 2025 23:39:01 +0200

fix #9223 (exiv2-0.28 compatibility) as suggested by pinotree

Diffstat:
Msrc/plugins/exiv2_extractor.cc | 21++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc @@ -48,6 +48,14 @@ private: */ struct EXTRACTOR_ExtractContext *ec; +/** + * Dummy string "(unknown)" to represent the unknown source. + * + * It is needed as class variable as in EXIV2 0.28 and greater the path() method + * returns a const reference. + */ +std::string io_path; + public: /** @@ -58,6 +66,7 @@ public: ExtractorIO (struct EXTRACTOR_ExtractContext *s_ec) { ec = s_ec; + io_path = "(unknown)"; } @@ -589,9 +598,9 @@ ExtractorIO::eof () const /** - * Not supported. + * Return the string with the path. * - * @throws error + * @return the string "(unknown)" */ #if EXIV2_TEST_VERSION (0,28,0) const std::string& @@ -601,13 +610,7 @@ std::string ExtractorIO::path () const #endif { -#if EXIV2_TEST_VERSION (0,28,0) - throw Exiv2::Error (Exiv2::ErrorCode::kerDecodeLangAltQualifierFailed); -#elif EXIV2_TEST_VERSION (0,27,0) - throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed); -#else - throw Exiv2::BasicError<char> (42 /* error code */); -#endif + return io_path; }