Warn of single dots in ant_glob #1853

This commit is contained in:
Thomas Nagy 2016-11-19 09:12:33 +01:00
parent af66a27da3
commit 4699a7871d
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 4 additions and 1 deletions

View File

@ -126,8 +126,11 @@ def enhance_lib():
if k:
lst = Utils.to_list(k[0])
for pat in lst:
if '..' in pat.split('/'):
sp = pat.split('/')
if '..' in sp:
Logs.error("In ant_glob pattern %r: '..' means 'two dots', not 'parent directory'", k[0])
if '.' in sp:
Logs.error("In ant_glob pattern %r: '.' means 'one dot', not 'current directory'", k[0])
if kw.get('remove', True):
try:
if self.is_child_of(self.ctx.bldnode) and not kw.get('quiet', False):