diff --git a/doc/changelog.txt b/doc/changelog.txt index c297735..eab346c 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,3 +1,8 @@ +1.5 (released xx.xx.2014) + +* Fix detection of existing broken symlinks when unpacking. + + 1.4 (released 2.9.2013) * Add missing GZIP creation support for 7z modules. diff --git a/patoolib/__init__.py b/patoolib/__init__.py index b537095..e0be6ac 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -385,7 +385,7 @@ def move_outdir_orphan (outdir): if len(entries) == 1: src = os.path.join(outdir, entries[0]) dst = os.path.join(os.path.dirname(outdir), entries[0]) - if os.path.exists(dst): + if os.path.exists(dst) or os.path.islink(dst): return (False, "local file exists") shutil.move(src, dst) os.rmdir(outdir)