check for cachedir existance
This commit is contained in:
parent
46c601da63
commit
398a661dd9
1 changed files with 10 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#################################
|
||||
#
|
||||
# $Dwarf: article.rb,v 1.67 2003/04/28 20:50:43 ward Exp $
|
||||
# $Dwarf: article.rb,v 1.68 2003/06/14 23:44:20 ward Exp $
|
||||
# $Source$
|
||||
#
|
||||
# article.rb
|
||||
|
|
@ -82,6 +82,9 @@ def del_server(server)
|
|||
end
|
||||
|
||||
def get_articles(cachedir=false)
|
||||
if cachedir != false
|
||||
check_cache(cachedir)
|
||||
end
|
||||
for server in @connections.keys
|
||||
begin
|
||||
first, last = get_group_info(server)
|
||||
|
|
@ -498,6 +501,12 @@ def save_newsrc()
|
|||
end
|
||||
end
|
||||
|
||||
def check_cache(cachedir)
|
||||
if ! FileTest.exists?(cachedir)
|
||||
print "Cachedir '#{cachedir}' doesn't exists, performance will suffer\n"
|
||||
end
|
||||
end
|
||||
|
||||
def read_cache(cachedir)
|
||||
filename = "#{cachedir}/#{@group}.ripnewscache"
|
||||
excludes = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue