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

View File

@ -77,14 +77,13 @@ void LauncherApp::AboutRequested()
void LauncherApp::ArgvReceived(int32 argc, char** argv)
{
for (int i = 1; i < argc; i++) {
const char* url = argv[i];
BEntry entry(argv[i], true);
if (!entry.Exists())
continue;
BPath path;
if (entry.GetPath(&path) != B_OK)
continue;
if (entry.Exists() && entry.GetPath(&path) == B_OK)
url = path.Path();
BMessage message(LOAD_AT_STARTING);
message.AddString("url", path.Path());
message.AddString("url", url);
message.AddBool("new window", m_initialized || i > 1);
PostMessage(&message);
}