[Sugar-devel] [PATCH] account for exec in subpath

Walter Bender walter at sugarlabs.org
Mon Jun 6 14:26:03 EDT 2011


From: Walter Bender <walter.bender at gmail.com>

---
 src/jarabe/view/viewsource.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index 661ad61..0b851a6 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -132,8 +132,9 @@ class ViewSource(gtk.Window):
         activity_bundle = ActivityBundle(bundle_path)
         command = activity_bundle.get_command()
         if len(command.split(' ')) > 1:
-            name = command.split(' ')[1].split('.')[0]
-            file_name = name + '.py'
+            name = command.split(' ')[1].split('.')[-1]
+            tmp_path = command.split(' ')[1].replace('.', '/')
+            file_name = tmppath[0:-(len(name) + 1)] + '.py'
             path = os.path.join(activity_bundle.get_path(), file_name)
             self._selected_file = path
 
-- 
1.7.4.4



More information about the Sugar-devel mailing list