|
|
|
@ -15,7 +15,9 @@
|
|
|
|
|
#include "utils.hpp"
|
|
|
|
|
|
|
|
|
|
// + standard includes
|
|
|
|
|
#ifdef EXV_ENABLE_INIH
|
|
|
|
|
#include <INIReader.h>
|
|
|
|
|
#endif
|
|
|
|
|
#include <array>
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
#include <iostream>
|
|
|
|
@ -81,10 +83,12 @@ std::string getExiv2ConfigPath() {
|
|
|
|
|
std::string readExiv2Config(const std::string& section, const std::string& value, const std::string& def) {
|
|
|
|
|
std::string result = def;
|
|
|
|
|
|
|
|
|
|
#ifdef EXV_ENABLE_INIH
|
|
|
|
|
INIReader reader(Exiv2::Internal::getExiv2ConfigPath());
|
|
|
|
|
if (reader.ParseError() == 0) {
|
|
|
|
|
result = reader.Get(section, value, def);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|