changeset 360:95874699ec2e

sources: Fix how the `autoconfig` source iterates over its structure.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 20 Apr 2015 23:57:10 -0700
parents 2cd2b5d07129
children b9779d989319
files piecrust/sources/autoconfig.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/sources/autoconfig.py	Mon Apr 20 23:56:35 2015 -0700
+++ b/piecrust/sources/autoconfig.py	Mon Apr 20 23:57:10 2015 -0700
@@ -252,7 +252,7 @@
         if rel_path != '':
             parts = rel_path.split('/')
             for p in parts:
-                p_pat = r'(\d+_)?' + re.escape(p)
+                p_pat = r'(\d+_)?' + re.escape(p) + '$'
                 for name in os.listdir(path):
                     if re.match(p_pat, name):
                         path = os.path.join(path, name)