summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/feed2imap/feed2imap.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
index 061e8c6..08ceb4f 100644
--- a/lib/feed2imap/feed2imap.rb
+++ b/lib/feed2imap/feed2imap.rb
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
=end
# Feed2Imap version
-F2I_VERSION = '0.9'
+F2I_VERSION = '0.9.2'
require 'feed2imap/config'
require 'feed2imap/cache'
@@ -244,9 +244,14 @@ class Feed2Imap
end
@logger.info("Finished. Saving cache ...")
begin
- File::open(@config.cache, 'w') { |f| @cache.save(f) }
+ File::open("#{@config.cache}.new", 'w') { |f| @cache.save(f) }
rescue
- @logger.fatal("Exception caught while writing cache to #{@config.cache}: #{$!}")
+ @logger.fatal("Exception caught while writing new cache to #{@config.cache}.new: #{$!}")
+ end
+ begin
+ File::rename("#{@config.cache}.new", @config.cache)
+ rescue
+ @logger.fatal("Exception caught while renaming #{@config.cache}.new to #{@config.cache}: #{$!}")
end
@logger.info("Closing IMAP connections ...")
@config.imap_accounts.each_value do |ac|
d>1-85/+134 2009-09-06Moved the menu to an extra fileRené 'Necoro' Neumann2-210/+207 2009-09-05One database instance is enough :)René 'Necoro' Neumann1-7/+18 2009-09-05Print database type at the bottom of exceptions. NOTE: This does not handle m...René 'Necoro' Neumann2-1/+6 2009-09-05Fix an error, where a category vanishes after refreshing, using the EixSQLDat...René 'Necoro' Neumann2-1/+19 2009-09-03And here is the debugging again :) ... using ctypesRené 'Necoro' Neumann1-1/+8 2009-09-03Screw debugging ... prefer the ctypes approach to get rid of yet another c-mo...René 'Necoro' Neumann3-27/+11 2009-09-03Use this wrapper instead of ctypes to set the textdomain and stuff for the gt...René 'Necoro' Neumann1-9/+5 2009-09-03Add small wrapper to C-gettextRené 'Necoro' Neumann2-1/+22 2009-08-31Update messages.potRené 'Necoro' Neumann1-42/+94 2009-08-31Removed the gtk- strings from translationsRené 'Necoro' Neumann7-3639/+3479 2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11 2009-08-31Removed TODO. Renamed ChangeLog to TODORené 'Necoro' Neumann2-40/+0 2009-08-27Only import stuff if necessaryRené 'Necoro' Neumann1-8/+8 2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1 2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687 2009-08-15Update spanish translationDaniel Halens1-245/+258 2009-08-15Use boolean flags instead of obscure C flags for ipc.MessageQueueRené 'Necoro' Neumann3-13/+15 2009-08-15TypoRené 'Necoro' Neumann1-1/+1 2009-08-15Enhanced the extensions.shRené 'Necoro' Neumann1-3/+8 2009-08-15Move eix-format to correct locationRené 'Necoro' Neumann1-0/+0