From 97e6480be160c5bf4ad6ecdd0013cef7b2bc3e53 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 5 Jan 2009 11:58:45 +0100 Subject: [PATCH] Fix uninstallling of activities that use symlinks #171 --- src/sugar/bundle/bundle.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sugar/bundle/bundle.py b/src/sugar/bundle/bundle.py index ed0360d4..a1b26864 100644 --- a/src/sugar/bundle/bundle.py +++ b/src/sugar/bundle/bundle.py @@ -191,5 +191,9 @@ class Bundle(object): for name in files: os.remove(os.path.join(root, name)) for name in dirs: - os.rmdir(os.path.join(root, name)) + path = os.path.join(root, name) + if os.path.islink(path): + os.remove(path) + else: + os.rmdir(path) os.rmdir(install_path)