mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
FileManager: Created desktop shortcuts should use full basename
A shortcut to ReadMe.md should be called "ReadMe.md", not "ReadMe".
This commit is contained in:
parent
327f595f63
commit
26cb083c6e
Notes:
sideshowbarker
2024-07-19 00:30:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/26cb083c6e8
1 changed files with 1 additions and 2 deletions
|
@ -175,8 +175,7 @@ void do_paste(const String& target_directory, GUI::Window* window)
|
|||
void do_create_link(const Vector<String>& selected_file_paths, GUI::Window* window)
|
||||
{
|
||||
auto path = selected_file_paths.first();
|
||||
auto title = LexicalPath(path.view()).title();
|
||||
auto destination = String::formatted("{}/{}", Core::StandardPaths::desktop_directory(), title);
|
||||
auto destination = String::formatted("{}/{}", Core::StandardPaths::desktop_directory(), LexicalPath { path }.basename());
|
||||
if (!FileUtils::link_file(path, destination)) {
|
||||
GUI::MessageBox::show(window, "Could not create desktop shortcut", "File Manager",
|
||||
GUI::MessageBox::Type::Error);
|
||||
|
|
Loading…
Reference in a new issue