author | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-05-09 06:34:31 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-05-09 06:35:55 UTC |
parent | acca81a3f471a6c3bd6eabf6d929ee8ac9de563f |
sea | +4 | -1 |
diff --git a/sea b/sea index 22d14ea..6a5ff08 100755 --- a/sea +++ b/sea @@ -55,7 +55,10 @@ def main(infd, basepath): if not fname or "=?" in fname: ext = mimetypes.guess_extension( part.get_content_type() ) - fname = 'att-%d.%s' % (count, ext) + if ext: + fname = 'att-%d%s' % (count, ext) + else: + fname = 'att-%d' % count fname = fname.replace('/', '') # since it's not multipart (checked earlier), we know this is