aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Fourchan.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}