From 19145347c5a692941c742b097e918f8d05d59815 Mon Sep 17 00:00:00 2001 From: GetAway Date: Sun, 21 Jan 2018 20:30:33 +0100 Subject: [PATCH] neutrinoapi.cpp: fix path to iso tab introduced with 3c859db --- src/nhttpd/tuxboxapi/neutrinoapi.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index a4f3d8aea..be4bff274 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -18,6 +18,7 @@ #include #include #include +#include // tuxbox #include @@ -66,10 +67,13 @@ extern CZapitClient::SatelliteList satList; //static std::map iso639; #ifndef initialize_iso639_map +#define ISO_639_TAB DATADIR "/iso-codes/iso-639.tab" +static const char * iso639filename = ISO_639_TAB; + bool _initialize_iso639_map(void) { std::string s, t, u, v; - std::ifstream in("/share/iso-codes/iso-639.tab"); + std::ifstream in(iso639filename); if (in.is_open()) { while (in.peek() == '#') @@ -85,7 +89,10 @@ bool _initialize_iso639_map(void) return true; } else + { + std::cout << "[neutrinoapi.cpp] Loading " << iso639filename << " failed." << std::endl; return false; + } } #endif //-----------------------------------------------------------------------------