From e5f2afe0dbf2a39d6b697ab9b418507d4320951d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20=E2=80=9CFreso=E2=80=9D=20S=2E=20Olesen?= Date: Sat, 29 Apr 2017 14:34:07 +0200 Subject: [PATCH] Break out of disambiguation loop once disambig has been added Instead of iterating over all the path parts and added disambiguation to each, it now only adds the disambiguation to the first match. --- whipper/common/program.py | 1 + 1 file changed, 1 insertion(+) diff --git a/whipper/common/program.py b/whipper/common/program.py index 8d6bebf..9791ae8 100644 --- a/whipper/common/program.py +++ b/whipper/common/program.py @@ -250,6 +250,7 @@ class Program: templateParts[i] += ' (%s)' % self.metadata.catalogNumber elif self.metadata.barcode: templateParts[i] += ' (%s)' % self.metadata.barcode + break template = os.path.join(*templateParts) logger.debug('Disambiguated template to %r' % template)