Mercurial > piecrust2
comparison piecrust/processing/base.py @ 22:df790a827d38
Correctly match skip patterns.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 18 Aug 2014 23:20:43 -0700 |
parents | 617191dec18e |
children | e4c345dcf33c |
comparison
equal
deleted
inserted
replaced
21:53b9df2263dc | 22:df790a827d38 |
---|---|
330 | 330 |
331 def re_matchany(filename, patterns): | 331 def re_matchany(filename, patterns): |
332 # skip patterns use a forward slash regardless of the platform. | 332 # skip patterns use a forward slash regardless of the platform. |
333 filename = filename.replace('\\', '/') | 333 filename = filename.replace('\\', '/') |
334 for pattern in patterns: | 334 for pattern in patterns: |
335 if pattern.match(filename): | 335 if pattern.search(filename): |
336 return True | 336 return True |
337 return False | 337 return False |
338 | 338 |