From 8a65588584c4fcf72b4f2ed1aca573b3d6c53c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 3 Nov 2009 11:55:21 +0100 Subject: [PATCH] Replace also altsep in report name for issue1270 Use extsep instead of '.' (transplanted from 8f078bc410b3d2fc84bef5363d0b5e60eb7a080a) --- tryton/action/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tryton/action/main.py b/tryton/action/main.py index 5a90e855b7..e6f87278b9 100644 --- a/tryton/action/main.py +++ b/tryton/action/main.py @@ -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()