Ticket #15199: 15199-collectstatic.patch
File 15199-collectstatic.patch, 973 bytes (added by , 14 years ago) |
---|
-
django/contrib/staticfiles/management/commands/collectstatic.py
115 115 symlink = options['link'] 116 116 dry_run = options['dry_run'] 117 117 118 if settings.STATIC_ROOT in settings.MEDIA_ROOT: 119 media_root = settings.MEDIA_ROOT.replace(settings.STATIC_ROOT, '') 120 if media_root.startswith('/'): 121 media_root = media_root[1:] 122 123 if destination.split('/')[0] == media_root: 124 msg = "Skipping '%s' (attempting to write to MEDIA_ROOT)" 125 self.log(msg % destination) 126 return False 127 118 128 if destination in self.copied_files: 119 129 self.log("Skipping '%s' (already copied earlier)" % destination) 120 130 return False