From fe533a5076daf7cbec60180a92102d0eca261eee Mon Sep 17 00:00:00 2001 From: Albert S Date: Sat, 29 Jul 2023 09:52:07 +0200 Subject: [PATCH] Disable caching if no cache dir given --- qswiki.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qswiki.cpp b/qswiki.cpp index 6be1ce1..f55d34f 100644 --- a/qswiki.cpp +++ b/qswiki.cpp @@ -37,6 +37,7 @@ SOFTWARE. #include "urlprovider.h" #include "requestworker.h" #include "cache/fscache.h" +#include "cache/nocache.h" #include "sandbox/sandboxfactory.h" #include "cli.h" #include "cliconsole.h" @@ -68,9 +69,11 @@ static struct option long_options[] = {{"cli", no_argument, 0, 'c'}, {"version", std::unique_ptr createCache(const ConfigVariableResolver &resolver) { - std::string path = resolver.getConfig("cache_fs_dir"); - + if(path == "") + { + return std::make_unique(path); + } return std::make_unique(path); }