Skip to content

Commit

Permalink
FileManager: Created desktop shortcuts should use full basename
Browse files Browse the repository at this point in the history
A shortcut to ReadMe.md should be called "ReadMe.md", not "ReadMe".
  • Loading branch information
awesomekling committed Dec 28, 2020
1 parent 327f595 commit 26cb083
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Applications/FileManager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 26cb083

Please sign in to comment.