Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-09-20 13:40:24 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-09-20 13:40:24 (GMT)
commit823188957cc4aab7ef566cecd0f107c4695de429 (patch)
tree43272f9925cd81404c97fb162dab171e61afd1fa
parent7a8dc0dd70d9f80c489149de2fd64a0b90ac4519 (diff)
Treat broken symlinks corretcly #1394
-rw-r--r--src/sugar/bundle/activitybundle.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index 95fc4dd..a1f10b9 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -371,12 +371,12 @@ class ActivityBundle(Bundle):
def _symlink(self, src, dst):
if not os.path.isfile(src):
return
- if os.path.exists(dst) and not os.path.islink(dst):
+ if not os.path.islink(dst) and os.path.exists(dst):
raise RuntimeError('Do not remove %s if it was not '
'installed by sugar', dst)
logging.debug('Link resource %s to %s', src, dst)
- if os.path.exists(dst):
- logging.debug('Rewrite %s', dst)
+ if os.path.lexists(dst):
+ logging.debug('Relink %s', dst)
os.unlink(dst)
os.symlink(src, dst)