Edgewall Software

Ticket #1112: trac-0.8-attachments.patch

File trac-0.8-attachments.patch, 0.5 kB (added by bitserf@…, 4 years ago)

patch to fix viewing of attachments with spaces in the filename

  • File.py

    old new  
    137137                                     urllib.quote(self.attachment_id), 
    138138                                     urllib.quote(self.filename)) 
    139139            try: 
    140                 fd = open(self.path, 'rb') 
     140                fd = open(urllib.unquote(self.path), 'rb') 
    141141            except IOError: 
    142142                raise util.TracError('Attachment not found') 
    143143