kill the disappearing tempfile problem

This commit is contained in:
Ward Wouts 2002-08-05 21:15:02 +00:00
parent 81acfe4397
commit 6367110c56

View file

@ -32,10 +32,17 @@ def save_file(dir, name, data)
case data.type.to_s
when "String"
if File.rename(data, "#{dir}/#{newname}")
print " Saving as: '#{newname}'\n"
else
print "couldn't rename tempfile\n"
begin
if File.rename(data, "#{dir}/#{newname}")
print " Saving as: '#{newname}'\n"
else
print "couldn't rename tempfile\n"
return false
end
rescue Errno::ENOENT
print "Caught Errno::ENOENT (save_file)\n"
print "Error: #{$!}\n"
print "What the #@$$ happended?\n"
return false
end
when "Array"
@ -246,7 +253,7 @@ def get_multi(subj, group)
return false unless check_ext(filename, "m")
body = fileout.path
file.close
fileout.close
fileout.close(false)
return mode, filename, body
else
print " Unknown encoding (not UU, not yEnc), skipping...\n"