open: B_ALREADY_RUNNING is valid for BUrl::OpenWithPreferredApplication().
Caused `open` to display an error with non-zero exit code when the target application was already running and is single launch. In fact, the error check at the end explicitly tests for B_ALREADY_RUNNING along with B_OK. Change-Id: Ic38c961bcdd8350b97b0d75ec010d25198afd561
This commit is contained in:
+2
-2
@@ -97,8 +97,8 @@ main(int argc, char** argv)
|
||||
} else if (strchr(*argv, ':')) {
|
||||
// try to open it as an URI
|
||||
BUrl url(*argv);
|
||||
if (url.OpenWithPreferredApplication() == B_OK) {
|
||||
result = B_OK;
|
||||
result = url.OpenWithPreferredApplication();
|
||||
if (result == B_OK || result == B_ALREADY_RUNNING)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user