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["group"] = {}
|
||||||
@newsrc["list"] = []
|
@newsrc["list"] = []
|
||||||
|
|
||||||
|
if FileTest.file?( "#{file}" ) and FileTest.readable?( "#{file}" )
|
||||||
lines = IO.readlines("#{file}")
|
lines = IO.readlines("#{file}")
|
||||||
import_rc(lines)
|
import_rc(lines)
|
||||||
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue