extension matching works, remove debugging info
This commit is contained in:
parent
7d80240410
commit
9f8bae179c
1 changed files with 1 additions and 19 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/local/bin/ruby -w
|
||||
|
||||
# $Dwarf: ripnews.rb,v 1.42 2003/04/18 21:39:29 ward Exp $
|
||||
# $Dwarf: ripnews.rb,v 1.43 2003/04/18 22:27:58 ward Exp $
|
||||
# $Source$
|
||||
|
||||
require 'date'
|
||||
|
|
@ -249,7 +249,6 @@ def get_multi(subj, group)
|
|||
return false
|
||||
end
|
||||
return false unless check_ext(group, filename, "m")
|
||||
print " should have a match here else something's wrong\n"
|
||||
return mode, filename, body
|
||||
else
|
||||
body = @articles.get_group_body_first(subj)
|
||||
|
|
@ -266,7 +265,6 @@ def get_multi(subj, group)
|
|||
end
|
||||
# in plaats van hier
|
||||
return false unless check_ext(group, filename, "m")
|
||||
print " should have a match here else something's wrong\n"
|
||||
body = fileout.path
|
||||
bodybase = body.sub(/\/[^\/]*$/, "")
|
||||
File.rename(body, "#{bodybase}/ripnewsdecode")
|
||||
|
|
@ -317,24 +315,8 @@ def check_ext(group, filename, mode)
|
|||
print " filename: #{filename}\n";
|
||||
case mode
|
||||
when "s"
|
||||
######## debuging
|
||||
print " sould have extension: #{@config[group]["-S"]}\n";
|
||||
if ( @config[group].has_key?("-S") && filename =~ /\.(#{@config[group]["-S"]})$/ )
|
||||
print " extension matches\n"
|
||||
else
|
||||
print " extension doesn't match\n"
|
||||
end
|
||||
######## /debuging
|
||||
return @config[group].has_key?("-S") ? ( filename =~ /\.(#{@config[group]["-S"]})$/ ) : true
|
||||
when "m"
|
||||
######## debuging
|
||||
print " sould have extension: #{@config[group]["-M"]}\n";
|
||||
if ( @config[group].has_key?("-S") && filename =~ /\.(#{@config[group]["-M"]})$/ )
|
||||
print " extension matches\n"
|
||||
else
|
||||
print " extension doesn't match\n"
|
||||
end
|
||||
######## /debuging
|
||||
return @config[group].has_key?("-M") ? ( filename =~ /\.(#{@config[group]["-M"]})$/ ) : true
|
||||
else
|
||||
print "Illegal mode \"#{mode}\" in check_ext\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue