From 47811b9b3b0f3e575bbbbff0babc4b5e837092e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Sun, 2 Oct 2005 01:22:13 +0000 Subject: [PATCH] this is was our favorite bug ever. now this is a retry from me ;). --- pisi/archive.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pisi/archive.py b/pisi/archive.py index 5e428a38..950536f4 100644 --- a/pisi/archive.py +++ b/pisi/archive.py @@ -154,8 +154,9 @@ class ArchiveZip(ArchiveBase): # check that output dir is present util.check_dir(os.path.dirname(ofile)) - # remove output file we might be overwriting - if os.path.exists(ofile): + # remove output file we might be overwriting. + # (also check for islink? for broken symlinks...) + if os.path.exists(ofile) or os.path.islink(ofile): os.remove(ofile) if info.external_attr == self.symmagic: