﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22704	"""collectstatic"" fails when there is a dangling symlink (in the source)"	Daniel Hahler	nobody	"If there exists a dangling symlink in one of `STATICFILES_DIRS`, `manage.py collectstatic` aborts as follows:

{{{
% python manage.py collectstatic --noinput
Copying '/tmp/django-static.in/bar'
Traceback (most recent call last):
  File ""manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""…/django-master/django/core/management/__init__.py"", line 429, in execute_from_command_line
    utility.execute()
  File ""…/django-master/django/core/management/__init__.py"", line 421, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""…/django-master/django/core/management/base.py"", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""…/django-master/django/core/management/base.py"", line 337, in execute
    output = self.handle(*args, **options)
  File ""…/django-master/django/core/management/base.py"", line 532, in handle
    return self.handle_noargs(**options)
  File ""…/django-master/django/contrib/staticfiles/management/commands/collectstatic.py"", line 168, in handle_noargs
    collected = self.collect()
  File ""…/django-master/django/contrib/staticfiles/management/commands/collectstatic.py"", line 107, in collect
    handler(path, prefixed_path, storage)
  File ""…/django-master/django/contrib/staticfiles/management/commands/collectstatic.py"", line 314, in copy_file
    with source_storage.open(path) as source_file:
  File ""…/django-master/django/core/files/storage.py"", line 35, in open
    return self._open(name, mode)
  File ""…/django-master/django/core/files/storage.py"", line 173, in _open
    return File(open(self.path(name), mode))
IOError: [Errno 2] No such file or directory: u'/tmp/django-static.in/bar'
}}}

I think there should be at least an option to skip dangling symlinks, or skip them by default and log a warning message.
"	New feature	closed	contrib.staticfiles	dev	Normal	wontfix	symlink		Unreviewed	0	0	0	0	0	0
