Changeset 4192

Show
Ignore:
Timestamp:
08/27/08 11:30:31 (4 months ago)
Author:
Blackhex
Message:

ScreenshotsPlugin:

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • screenshotsplugin/0.10/tracscreenshots/core.py

    r3313 r4192  
    382382 
    383383                    # Delete screenshot files. Don't append any other files there :-). 
    384                     path = os.path.join(self.path, unicode(screenshot['id'])) 
     384                    path = os.path.join(self.path, to_unicode(screenshot['id'])) 
     385                    path = os.path.normpath(path) 
     386                    self.log.debug('path: %s' % (path,)) 
    385387                    for file in os.listdir(path): 
    386388                        file = os.path.join(path, file) 
     389                        file = os.path.normpath(file) 
    387390                        os.remove(file) 
    388391                    os.rmdir(path) 
  • screenshotsplugin/0.11/tracscreenshots/core.py

    r3313 r4192  
    411411                    # Delete screenshot files. Don't append any other files there :-). 
    412412                    path = os.path.join(self.path, to_unicode(screenshot['id'])) 
    413                     path = unicodedata.normalize('NFC', path) 
    414                     path = path.replace('\\', '/').replace(':', '/') 
     413                    path = os.path.normpath(path) 
    415414                    self.log.debug('path: %s' % (path,)) 
    416415                    for file in os.listdir(path): 
    417416                        file = os.path.join(path, file) 
     417                        file = os.path.normpath(file) 
    418418                        os.remove(file) 
    419419                    os.rmdir(path)