From a596206ab0288cb024b5e20bd5c70cb6d150a8de Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Thu, 20 Sep 2018 01:23:02 +0200 Subject: PkgPolicy.symlink_orig: also remove dangling symlinks --- gbp/pkg/pkgpolicy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gbp/pkg/pkgpolicy.py b/gbp/pkg/pkgpolicy.py index e6b3683b..53887fee 100644 --- a/gbp/pkg/pkgpolicy.py +++ b/gbp/pkg/pkgpolicy.py @@ -155,7 +155,7 @@ class PkgPolicy(object): err.append(f) continue try: - if os.path.exists(dst) and force: + if os.path.lexists(dst) and force: os.unlink(dst) os.symlink(src, dst) except OSError: -- cgit v1.2.3