From a3ea98904c040b1aa8d011d5b10b457fe25fb57f Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Sun, 5 May 2002 14:51:02 +0000 Subject: [PATCH] check newsrc readablitiy before reading --- trunk/ripnews/news/newsrc.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/ripnews/news/newsrc.rb b/trunk/ripnews/news/newsrc.rb index c557529..7a476f0 100644 --- a/trunk/ripnews/news/newsrc.rb +++ b/trunk/ripnews/news/newsrc.rb @@ -32,8 +32,10 @@ def load(file=nil) @newsrc["group"] = {} @newsrc["list"] = [] - lines = IO.readlines("#{file}") - import_rc(lines) + if FileTest.file?( "#{file}" ) and FileTest.readable?( "#{file}" ) + lines = IO.readlines("#{file}") + import_rc(lines) + end return true end