From 99915ba9ec15a5018be4e7793c1482a032c3ca14 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 22 Jun 2020 21:50:48 +0200 Subject: Support installation resources path --- src/plugins/Fourchan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp index 073356b..22a3faf 100644 --- a/src/plugins/Fourchan.cpp +++ b/src/plugins/Fourchan.cpp @@ -12,7 +12,7 @@ static const std::string fourchan_url = "https://a.4cdn.org/"; static const std::string fourchan_image_url = "https://i.4cdn.org/"; namespace QuickMedia { - Fourchan::Fourchan() : ImageBoard("4chan") { + Fourchan::Fourchan(const std::string &resources_root) : ImageBoard("4chan"), resources_root(resources_root) { thread_list_update_thread = std::thread([this]() { BodyItems new_thread_list_items; while(running) { @@ -52,7 +52,7 @@ namespace QuickMedia { return PluginResult::NET_ERR; #else std::string server_response; - if(file_get_content("../../../boards.json", server_response) != 0) { + if(file_get_content(resources_root + "boards.json", server_response) != 0) { fprintf(stderr, "failed to read boards.json\n"); return PluginResult::ERR; } -- cgit v1.2.3