From 26cb083c6e85693f78338a0312c04d4ae1d80c02 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 28 Dec 2020 09:38:11 +0100 Subject: [PATCH] FileManager: Created desktop shortcuts should use full basename A shortcut to ReadMe.md should be called "ReadMe.md", not "ReadMe". --- Applications/FileManager/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index f7c650f321..42a50fa898 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -175,8 +175,7 @@ void do_paste(const String& target_directory, GUI::Window* window) void do_create_link(const Vector& 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);