Mercurial > ~astiob > upreckon > hgweb
comparison 2.00/files.py @ 34:8fec38b0dd6e
A os.path.relpath implementation for Python 2.5
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Tue, 30 Nov 2010 00:18:17 +0000 |
parents | fe1463e7e24d |
children |
comparison
equal
deleted
inserted
replaced
33:f90bd2d1a12b | 34:8fec38b0dd6e |
---|---|
119 path = os.path.join(os.path.splitdrive(target)[0], os.path.sep) | 119 path = os.path.join(os.path.splitdrive(target)[0], os.path.sep) |
120 else: | 120 else: |
121 path = None | 121 path = None |
122 | 122 |
123 member = self.file.getinfo(name) | 123 member = self.file.getinfo(name) |
124 # FIXME: 2.5 lacks os.path.realpath | |
125 member.filename = os.path.relpath(target, path) | 124 member.filename = os.path.relpath(target, path) |
126 # FIXME: 2.5 lacks ZipFile.extract | 125 # FIXME: 2.5 lacks ZipFile.extract |
127 self.file.extract(member, path) | 126 self.file.extract(member, path) |
128 | 127 |
129 def open(self, name): | 128 def open(self, name): |