changeset 0a1339c4ec24 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=0a1339c4ec24
description:
        Unquote file name of attachment dropped

        issue10189
        review345521002
diffstat:

 tryton/gui/window/attachment.py |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (13 lines):

diff -r dc0520e83643 -r 0a1339c4ec24 tryton/gui/window/attachment.py
--- a/tryton/gui/window/attachment.py   Thu Mar 11 23:34:44 2021 +0100
+++ b/tryton/gui/window/attachment.py   Thu Mar 18 21:31:07 2021 +0100
@@ -50,8 +50,7 @@
         if not parse.scheme:
             description_field.set_client(new_record, uri)
         else:
-            uri = unquote(uri)
-            file_name = os.path.basename(parse.path)
+            file_name = os.path.basename(unquote(parse.path))
             name_field.set_client(new_record, file_name)
             if parse.scheme == 'file':
                 data_field.set_client(new_record, urlopen(uri).read())

Reply via email to