From d52d36aa5d72488a2725d0a52cf0f602251c0fe9 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 1 Jan 2019 17:28:14 +0100 Subject: [PATCH] open: don't print "invalid argument" when opening an URL. Reset the error code. Change-Id: I5b58c3082f5758d4cbca8c9706048e3414f939c9 Reviewed-on: https://review.haiku-os.org/807 Reviewed-by: waddlesplash --- src/bin/open.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/open.cpp b/src/bin/open.cpp index 916e80692b..02aaa6565e 100644 --- a/src/bin/open.cpp +++ b/src/bin/open.cpp @@ -97,8 +97,10 @@ main(int argc, char** argv) } else if (strchr(*argv, ':')) { // try to open it as an URI BUrl url(*argv); - if (url.OpenWithPreferredApplication() == B_OK) + if (url.OpenWithPreferredApplication() == B_OK) { + result = B_OK; continue; + } // maybe it's "file:line" or "file:line:col" int line = 0, col = 0, i;