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 <[email protected]>
This commit is contained in:
Adrien Destugues
2019-01-01 17:48:29 +00:00
committed by waddlesplash
parent b02e6250e9
commit d52d36aa5d
+3 -1
View File
@@ -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;