diff options
author | speles <speles@mail.ua> | 2021-03-01 23:24:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-07 11:00:36 +0100 |
commit | 50de653cc998ac53901f748ac597c1d38e705938 (patch) | |
tree | f3b3ea53473dcad6354b1301be7b951e1bc36d50 /AK/URL.cpp | |
parent | 1496b022037d24f83d034459a65a84f1df92bd8f (diff) | |
download | serenity-50de653cc998ac53901f748ac597c1d38e705938.zip |
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.
Diffstat (limited to 'AK/URL.cpp')
-rw-r--r-- | AK/URL.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/AK/URL.cpp b/AK/URL.cpp index 6b84a6c6ea..505213d4e7 100644 --- a/AK/URL.cpp +++ b/AK/URL.cpp @@ -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; } |