From f9d051d5f0ea5853373150c689daf4f5a691ef99 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Mon, 30 Aug 2010 11:47:32 +0000 Subject: [PATCH] Fixed #14145 - undeterministic behavior when project or app template contains dotdir Thanks to marbu for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13668 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/management/base.py b/django/core/management/base.py index 0dc8d0356c..dcd83ff300 100644 --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -394,9 +394,9 @@ def copy_helper(style, app_or_project, name, directory, other_name=''): relative_dir = d[len(template_dir)+1:].replace('%s_name' % app_or_project, name) if relative_dir: os.mkdir(os.path.join(top_dir, relative_dir)) - for i, subdir in enumerate(subdirs): + for subdir in subdirs[:]: if subdir.startswith('.'): - del subdirs[i] + subdirs.remove(subdir) for f in files: if not f.endswith('.py'): # Ignore .pyc, .pyo, .py.class etc, as they cause various