From 0b7def17884447dbb5e221a52d4f71aeeefe4e6d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 21 Oct 2008 16:12:22 +0200 Subject: [PATCH] If the binary to launch is inside the bundle dir, use an absolute path. --- src/sugar/activity/activityfactory.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py index 5b58d748..75503fcc 100644 --- a/src/sugar/activity/activityfactory.py +++ b/src/sugar/activity/activityfactory.py @@ -131,6 +131,11 @@ def get_command(activity, activity_id=None, object_id=None, uri=None): if uri is not None: command.extend(['-u', uri]) + bin_path = os.path.join(activity.get_path(), 'bin') + absolute_path = os.path.join(bin_path, command[0]) + if os.path.exists(absolute_path): + command[0] = absolute_path + logging.debug('launching: %r' % command) return command