fix: make symlinks updated...
This commit is contained in:
+7
-3
@@ -113,9 +113,13 @@ class ArchiveTar(ArchiveBase):
|
|||||||
#
|
#
|
||||||
# Also, tar.extract() doesn't write on symlinks... Not any
|
# Also, tar.extract() doesn't write on symlinks... Not any
|
||||||
# more :).
|
# more :).
|
||||||
if self.file_path == install_tar_path and os.path.exists(tarinfo.name) \
|
if self.file_path == install_tar_path:
|
||||||
and not os.path.isdir(tarinfo.name):
|
if os.path.isfile(tarinfo.name) or os.path.islink(tarinfo.name):
|
||||||
os.unlink(tarinfo.name)
|
try:
|
||||||
|
os.unlink(tarinfo.name)
|
||||||
|
except OSError, e:
|
||||||
|
ctx.ui.warning(e)
|
||||||
|
|
||||||
self.tar.extract(tarinfo)
|
self.tar.extract(tarinfo)
|
||||||
|
|
||||||
os.chdir(oldwd)
|
os.chdir(oldwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user