From 81d6346e7b0edcb4d2c5eb5f3647e22a88a174a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 16 May 2006 01:19:34 +0000 Subject: [PATCH] Launching scripts via the Roster is now actually working (there were some app registering stuff left that prevented that before). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17475 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/app/Roster.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kits/app/Roster.cpp b/src/kits/app/Roster.cpp index e361403a3d..acb6375748 100644 --- a/src/kits/app/Roster.cpp +++ b/src/kits/app/Roster.cpp @@ -1793,8 +1793,8 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref, if (GetRunningAppInfo(team, &appInfo) == B_OK) otherAppFlags = appInfo.flags; } + DBG(OUT(" pre-register: %s (%lx)\n", strerror(error), error)); } - DBG(OUT(" pre-register: %s (%lx)\n", strerror(error), error)); // launch the app if (error == B_OK && !alreadyRunning) { @@ -1817,7 +1817,7 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref, DBG(OUT(" load image: %s (%lx)\n", strerror(error), error)); // finish the registration - if (error == B_OK) + if (error == B_OK && !isScript) error = _SetThreadAndTeam(appToken, appThread, team); DBG(OUT(" set thread and team: %s (%lx)\n", strerror(error), error)); @@ -1830,7 +1830,8 @@ BRoster::_LaunchApp(const char *mimeType, const entry_ref *ref, if (error != B_OK) { if (appThread >= 0) kill_thread(appThread); - _RemovePreRegApp(appToken); + if (!isScript) + _RemovePreRegApp(appToken); } }