1 From 931e9aec73f94b5c6e70bcb9f0c857827650ec30 Mon Sep 17 00:00:00 2001
2 From: Simon Nagl <simonnagl@aim.com>
3 Date: Thu, 7 May 2015 22:06:00 +0200
4 Subject: [PATCH 1/1] Bugfix: #180 Fixed cleanup_cache for one line config file
6 Fixed the generation of the string list.
7 First with only one url in file urls list looked like this:
8 ('www.feed.com/rss''') which does not lead to a working SQL statement.
9 Now, lists do always end with ', '')
11 src/cache.cpp | 6 +-----
12 1 file changed, 1 insertion(+), 5 deletions(-)
14 diff --git a/src/cache.cpp b/src/cache.cpp
15 index ae2c98f..4376d10 100644
18 @@ -555,15 +555,11 @@ void cache::cleanup_cache(std::vector<std::shared_ptr<rss_feed>>& feeds) {
19 LOG(LOG_DEBUG,"cache::cleanup_cache: cleaning up cache...");
20 std::string list = "(";
23 - unsigned int feed_size = feeds.size();
25 for (auto feed : feeds) {
26 std::string name = prepare_query("'%q'",feed->rssurl().c_str());
28 - if (i < feed_size-1) {