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: