From f26d914fb16bdcc2bc653e2d521eea1d5823f454 Mon Sep 17 00:00:00 2001 From: lnu Date: Tue, 2 May 2006 12:35:50 +0000 Subject: fixed flock on Solaris git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@95 f70e237a-67f3-0310-a06c-d2b8a7116972 --- ChangeLog | 10 +++++++++- lib/feed2imap/cache.rb | 2 +- lib/feed2imap/feed2imap.rb | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f15d66..8209430 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,15 @@ Feed2Imap 0.8 (XX/XX/2006) ============================ +* Fixed a small bug in the duplicate items handling which could have caused + some items to be ignored if they had the same url but different content. +* New always-new flag in the config file to consider all items as new (for + feeds where items are wrongly marked as updated, e.g mediawiki feeds). + See example configuration file for more information. * Uses the http_proxy environment variable to determine the proxy server - if available. (fixes gna bug #5820, all credits go to Boyd Adamson) + if available. (fixes gna bug #5820, all credits go to Boyd Adamson + ) +* Fixes flocking on Solaris (fixes gna bug #5819). Again, all credits go to + Boyd Adamson . Feed2Imap 0.7 (17/02/2006) ============================ diff --git a/lib/feed2imap/cache.rb b/lib/feed2imap/cache.rb index cd75db2..9b5861f 100644 --- a/lib/feed2imap/cache.rb +++ b/lib/feed2imap/cache.rb @@ -132,7 +132,7 @@ class CachedChannel for j in i+1...items.length do if items[i].cacheditem == items[j].cacheditem if UPDATEDDEBUG - puts "## Removed #{items[j].cacheditem.to_s}" + puts "## Removed duplicate #{items[j].cacheditem.to_s}" end items.delete_at(j) dups = true diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb index 19d6ccd..68b94f0 100644 --- a/lib/feed2imap/feed2imap.rb +++ b/lib/feed2imap/feed2imap.rb @@ -66,7 +66,7 @@ class Feed2Imap f = File::new(@config.cache + '.lock', 'w') f.close end - if File::new(@config.cache + '.lock').flock(File::LOCK_EX | File::LOCK_NB) == false + if File::new(@config.cache + '.lock', 'w').flock(File::LOCK_EX | File::LOCK_NB) == false @logger.fatal("Another instance of feed2imap is already locking the cache file") exit(1) end -- cgit v1.2.3-70-g09d2