diff --git a/Userland/Libraries/LibCore/File.cpp b/Userland/Libraries/LibCore/File.cpp index a1d67291b1f..3f97cd1602c 100644 --- a/Userland/Libraries/LibCore/File.cpp +++ b/Userland/Libraries/LibCore/File.cpp @@ -497,7 +497,7 @@ Result File::link_file(String const& dst_path, String const& src_ ++duplicate_count; } if (duplicate_count != 0) { - return link_file(src_path, get_duplicate_name(dst_path, duplicate_count)); + return link_file(get_duplicate_name(dst_path, duplicate_count), src_path); } int rc = symlink(src_path.characters(), dst_path.characters()); if (rc < 0) {