#27658: collectstatic overwrites newer files in remote storage
-------------------------------------+-------------------------------------
     Reporter:  pgcd                 |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.staticfiles  |                  Version:  1.10
     Severity:  Normal               |               Resolution:
     Keywords:  staticfiles          |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Rebkavets Vitali):

 This line
 
[https://github.com/django/django/commit/2cd2d188516475ddf256e6267cd82c495fb5c430
 #diff-5e526cd393e2652c1d7f96704889a434R263 Github link]
 full_path for remote storages such as S3 is always None
 The clause was improperly refactored
 It should look like
 {{{
 ...
                     if (target_last_modified.replace(microsecond=0) >=
 source_last_modified.replace(microsecond=0) and
                             if not full_path or full_path and not
 (self.symlink ^ os.path.islink(full_path))):
 ...
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27658#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.428d2f601f604ddbb04a49e61891c82c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to