control: tags -1 patch

Thanks for the report!
>From 77087cf7a1b16d0be199c301ece62f04f06d5b6f Mon Sep 17 00:00:00 2001
From: Nis Martensen <nis.marten...@web.de>
Date: Mon, 1 Jan 2018 11:28:25 +0100
Subject: [PATCH] submit.py: dereference symbolic links when detecting file
 type

---
 reportbug/submit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/reportbug/submit.py b/reportbug/submit.py
index 4b72ceb..30cfdef 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -144,7 +144,7 @@ def mime_attach(body, attachments, charset, body_charset=None):
             continue
         ctype = None
         cset = charset
-        info = Popen(['file', '--mime', '--brief', attachment],
+        info = Popen(['file', '--mime', '--brief', '--dereference', attachment],
                      stdout=PIPE, stderr=STDOUT).communicate()[0].decode('ascii')
         if info:
             match = re.match(r'([^;, ]*)(,[^;]+)?(?:; )?(.*)', info)
-- 
2.11.0

_______________________________________________
Reportbug-maint mailing list
Reportbug-maint@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint

Reply via email to