Replace also altsep in report name for issue1270

Use extsep instead of '.'
(transplanted from 8f078bc410b3d2fc84bef5363d0b5e60eb7a080a)
This commit is contained in:
Cédric Krier committed 2009-11-03 11:55:21 +01:00
1 parent c6acf333b8
commit 8a65588584
1 file changed
+3 -1
+3 -1
View File
@@ -54,7 +54,9 @@ class Action(object):
if not print_p and direct_print:
print_p = True
dtemp = tempfile.mkdtemp(prefix='tryton_')
fp_name = os.path.join(dtemp, name.replace(os.sep, '_') + '.' + type)
fp_name = os.path.join(dtemp,
name.replace(os.sep, '_').replace(os.altsep or os.sep, '_') \
+ os.extsep + type)
file_d = open(fp_name, 'wb')
file_d.write(base64.decodestring(data))
file_d.close()