mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Browser: Turn command-line path arguments into file:// URLs
This commit is contained in:
parent
90cd363a8e
commit
5da385c16e
1 changed files with 6 additions and 3 deletions
|
@ -100,10 +100,13 @@ int main(int argc, char** argv)
|
|||
window->set_main_widget(widget);
|
||||
window->show();
|
||||
|
||||
String url_to_load = home_url;
|
||||
URL url_to_load = home_url;
|
||||
|
||||
if (app.args().size() >= 1)
|
||||
url_to_load = app.args()[0];
|
||||
if (app.args().size() >= 1) {
|
||||
url_to_load = URL();
|
||||
url_to_load.set_protocol("file");
|
||||
url_to_load.set_path(app.args()[0]);
|
||||
}
|
||||
|
||||
html_widget->load(url_to_load);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue