From 941d145f5ad8b1bd0b0d957ad891fdde14127029 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 31 Jul 2002 18:20:42 +0000 Subject: [PATCH] maxfilelength lijkt nu goed te werken --- trunk/ripnews/ripnews.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index fe3cd76..bc1448b 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -268,10 +268,11 @@ def output_data(subject, mode, filename="", body="") elsif @config[group].has_key?("-C") and @config[group]["-C"] print "combinedname\n" if Debuglevel > 1 outfile = "#{subject} [#{filename}]" + sub2 = subject while outfile.length > @maxfilelength lastlength = outfile.length - subject = subject[0...-1] - outfile = "#{subject} [#{filename}]" # this is going to loop if the #{filename} is too long :( + sub2 = sub2[0...-1] + outfile = "#{sub2} [#{filename}]" # this is going to loop if the #{filename} is too long :( if outfile.length == lastlength outfile = filename while outfile.length > @maxfilelength @@ -330,7 +331,6 @@ parse_config(defaults) check_config @maxfilelength = get_max_file_length(@config[@config.keys[0]]["TEMPDIR"]) -print "MAXFILELENGTH: #{@maxfilelength}\n" print "$Id$\n"