mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 12:35:08 +00:00
Browser: Accept file:// URLs on the command line
This could be a lot nicer, but at least we can open file:// URLs now.
This commit is contained in:
parent
b1555381ee
commit
8ef9c272b6
1 changed files with 7 additions and 3 deletions
|
@ -318,9 +318,13 @@ int main(int argc, char** argv)
|
|||
URL url_to_load = home_url;
|
||||
|
||||
if (app.args().size() >= 1) {
|
||||
url_to_load = URL();
|
||||
url_to_load.set_protocol("file");
|
||||
url_to_load.set_path(app.args()[0]);
|
||||
if (app.args()[0].starts_with("file://")) {
|
||||
url_to_load = URL(app.args()[0]);
|
||||
} else {
|
||||
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
Add a link
Reference in a new issue