Bug 484727 - KDE Connect's "Receiving File (Finished)" notification displays and opens incorrect file name for renamed copies
Summary: KDE Connect's "Receiving File (Finished)" notification displays and opens inc...
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (other bugs)
Version First Reported In: 24.02.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 20:36 UTC by tramonti.luca18
Modified: 2024-10-25 02:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tramonti.luca18 2024-03-29 20:36:25 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
When KDE Connect receives a file with a name identical to a file already in the downloads folder, it renames the incoming file appending '(1)' to it and displays a notification saying "Receiving File (Finished)". However, the file that's shown in the notification text and that gets opened with the "Open with" button still is the original, unrenamed one.

STEPS TO REPRODUCE
1. Create a file in the downloads folder of the computer that will receive the file and give it a name
2. Send a file with the same name and extension from the KDE Connect mobile app
3. Observe the "Receiving File (Finished)" notification on the device that received the file
4. Click "Open With [Default Program]" on the same notification

OBSERVED RESULT
The notification shows and opens the file that was already in the downloads folder (the one created in step 1)

EXPECTED RESULT
The notification shows and opens the new, renamed file with the (1) appended to its file name.

SOFTWARE/OS VERSIONS
Windows: n/a
macOS: n/a
Linux/KDE Plasma: 6.7.6-201.fsync.fc39.x86_64
(available in About System)
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
The file gets sent from the android KDE Connect app, but it should not be relevant
Comment 1 Bug Janitor Service 2024-03-30 18:02:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/663
Comment 2 cz1346219 2024-03-31 14:41:05 UTC
Git commit 8b6a58501484e3d8ffece603e85c9e2f90906d19 by Daozhong Ma.
Committed on 31/03/2024 at 01:51.
Pushed by albertvaka into branch 'master'.

Fix incorrect filename for duplicate copies on notification displays
The filename is just changed after notification is displayed.

M  +1    -1    core/compositefiletransferjob.cpp
M  +6    -6    core/filetransferjob.cpp

https://invent.kde.org/network/kdeconnect-kde/-/commit/8b6a58501484e3d8ffece603e85c9e2f90906d19