picolisp: Update from 17.7.9 to 17.8.7
[termux-packages] / packages / newsbeuter / 008_cleanup-cache.patch
CommitLineData
b3a91ddd
BK
1From 931e9aec73f94b5c6e70bcb9f0c857827650ec30 Mon Sep 17 00:00:00 2001
2From: Simon Nagl <simonnagl@aim.com>
3Date: Thu, 7 May 2015 22:06:00 +0200
4Subject: [PATCH 1/1] Bugfix: #180 Fixed cleanup_cache for one line config file
5
6Fixed the generation of the string list.
7First 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.
9Now, lists do always end with ', '')
10---
11 src/cache.cpp | 6 +-----
12 1 file changed, 1 insertion(+), 5 deletions(-)
13
14diff --git a/src/cache.cpp b/src/cache.cpp
15index ae2c98f..4376d10 100644
16--- a/src/cache.cpp
17+++ b/src/cache.cpp
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 = "(";
21 int rc;
22- unsigned int i = 0;
23- unsigned int feed_size = feeds.size();
24
25 for (auto feed : feeds) {
26 std::string name = prepare_query("'%q'",feed->rssurl().c_str());
27 list.append(name);
28- if (i < feed_size-1) {
29- list.append(", ");
30- }
31+ list.append(", ");
32 }
33 list.append("'')");
34
35--
362.7.4 (Apple Git-66)
37