From b39756813cb484215bd85096300fcaaa55e8c96d Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 2 Feb 2005 09:25:12 +0000 Subject: [PATCH] just let all variables in the thread start with a 't' --- trunk/ripnews/ripnews.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index bb0b2fd..9254697 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -1,6 +1,6 @@ #!/usr/local/bin/ruby -w -# $Dwarf: ripnews.rb,v 1.95 2005/02/01 22:09:22 ward Exp $ +# $Dwarf: ripnews.rb,v 1.96 2005/02/02 09:11:28 ward Exp $ # $Source$ # @@ -428,21 +428,21 @@ def get_multi(subj, group) if UUEncode.is_uuencoded(tbody) print " UUDecoding...\n" if tfile - mode, filename, tbody = UUEncode.uudecode(tfile, tfileout) + tmode, tfilename, tbody = UUEncode.uudecode(tfile, tfileout) else - mode, filename, tbody = UUEncode.uudecode(tbody) + tmode, tfilename, tbody = UUEncode.uudecode(tbody) end elsif YEnc.is_yencoded(tbody) print " YDecoding...\n" begin if tfile - mode, filename, tbody = YEnc.ydecode(tfile, tfileout) + tmode, tfilename, tbody = YEnc.ydecode(tfile, tfileout) else - mode, filename, tbody = YEnc.ydecode(tbody) + tmode, tfilename, tbody = YEnc.ydecode(tbody) end rescue YencError # XXX if there is a yenc problem I want the data so I can research it - output_data(subj, 0600, "YencProblem", tbody) + output_data(tsubj, 0600, "YencProblem", tbody) # XXX return succes even though it's not true return true rescue PermError @@ -451,7 +451,7 @@ def get_multi(subj, group) return false end end - if mode == false + if tmode == false print " Decoding failed skipping article...\n" return false end @@ -459,17 +459,17 @@ def get_multi(subj, group) if tfile # horrible cheat to not lose the outputted file tbody = tfileout.path - bodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode") + tbodybase = tbody.sub(/\/[^\/]*$/, "/ripnewsdecode") i = 1 - while FileTest.exists?("#{bodybase}-#{i}") + while FileTest.exists?("#{tbodybase}-#{i}") i += 1 end - File.move(tbody, "#{bodybase}-#{i}") - tbody = "#{bodybase}-#{i}" + File.move(tbody, "#{tbodybase}-#{i}") + tbody = "#{tbodybase}-#{i}" tfile.close tfileout.close(false) end - output_data(tsubj, mode, filename, tbody) + output_data(tsubj, tmode, tfilename, tbody) end # thread end @decode_threads.each{ |thr|