Fix regression about opening URLs from command line args.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@89 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi
2010-02-15 12:23:47 +00:00
parent 932b58673a
commit 56fc5b5b33
+4 -5
View File
@@ -77,14 +77,13 @@ void LauncherApp::AboutRequested()
void LauncherApp::ArgvReceived(int32 argc, char** argv) void LauncherApp::ArgvReceived(int32 argc, char** argv)
{ {
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
const char* url = argv[i];
BEntry entry(argv[i], true); BEntry entry(argv[i], true);
if (!entry.Exists())
continue;
BPath path; BPath path;
if (entry.GetPath(&path) != B_OK) if (entry.Exists() && entry.GetPath(&path) == B_OK)
continue; url = path.Path();
BMessage message(LOAD_AT_STARTING); BMessage message(LOAD_AT_STARTING);
message.AddString("url", path.Path()); message.AddString("url", url);
message.AddBool("new window", m_initialized || i > 1); message.AddBool("new window", m_initialized || i > 1);
PostMessage(&message); PostMessage(&message);
} }