#9610: File upload duplicate filename check mechanism fail
-------------------------------------------+--------------------------------
          Reporter:  fadlytabrani          |         Owner:  nobody  
            Status:  new                   |     Milestone:  post-1.0
         Component:  File uploads/storage  |       Version:  1.0     
        Resolution:                        |      Keywords:          
             Stage:  Unreviewed            |     Has_patch:  1       
        Needs_docs:  0                     |   Needs_tests:  0       
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by fadlytabrani):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Initial submitted fix doesn't work, this does

 {{{
 def get_available_namex(self, name):
         while self.exists(name):
             dname, fname = os.path.split(name)
             try:
                 dot_index = fname.rindex('.')
             except ValueError:
                 fname += '_'
             else:
                 fname = fname[:dot_index] + '_' + fname[dot_index:]
             name = os.path.join(dname, fname)
         return name
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9610#comment:1>
Django <http://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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to