mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
AK: Add optional fragment parameter to create_with_file_protocol()
Now that we use fragment for specifying starting selection in FileManager we would benefit from providing it as argument instead of setting it each time separately.
This commit is contained in:
parent
1496b02203
commit
50de653cc9
2 changed files with 3 additions and 2 deletions
|
@ -444,11 +444,12 @@ u16 URL::default_port_for_protocol(const String& protocol)
|
|||
return 0;
|
||||
}
|
||||
|
||||
URL URL::create_with_file_protocol(const String& path)
|
||||
URL URL::create_with_file_protocol(const String& path, const String& fragment)
|
||||
{
|
||||
URL url;
|
||||
url.set_protocol("file");
|
||||
url.set_path(path);
|
||||
url.set_fragment(fragment);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue