From 9cbc8a1bc431555724d41b9faefb891755a82067 Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Tue, 23 Oct 2018 20:09:45 +0800 Subject: [PATCH] Roundtrip fix: empty name is different to no name --- macresources/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macresources/main.py b/macresources/main.py index 18f566f..9cd1488 100644 --- a/macresources/main.py +++ b/macresources/main.py @@ -323,7 +323,8 @@ def make_rez_code(from_iter, ascii_clean=False): for resource in from_iter: args = [] args.append(str(resource.id).encode('ascii')) - if resource.name: args.append(_rez_escape(resource.name.encode('mac_roman'), singlequote=False, ascii_clean=ascii_clean)) + if resource.name is not None: + args.append(_rez_escape(resource.name.encode('mac_roman'), singlequote=False, ascii_clean=ascii_clean)) args.extend(x.encode('ascii') for x in resource.attribs._for_derez()) args = b', '.join(args)