check newsrc readablitiy before reading
This commit is contained in:
parent
1eb567322a
commit
a3ea98904c
1 changed files with 4 additions and 2 deletions
|
|
@ -32,8 +32,10 @@ def load(file=nil)
|
|||
@newsrc["group"] = {}
|
||||
@newsrc["list"] = []
|
||||
|
||||
if FileTest.file?( "#{file}" ) and FileTest.readable?( "#{file}" )
|
||||
lines = IO.readlines("#{file}")
|
||||
import_rc(lines)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue