Summary: | Can't edit an application's desktop entry which is a symlink, because symlink copied instead of target file | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Roman Nikonov <code> |
Component: | Properties dialog | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | alt, ashark, bizyaev, bugseforuns, cheery.idea2032, kdelibs-bugs, nate, stefan, tduck973564, twilightinzero, typingcat |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Manjaro | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=394476 https://bugs.kde.org/show_bug.cgi?id=407552 |
||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/a4be43231840a145c808f6ce81217f02f03935e8 | Version Fixed In: | 5.96 |
Sentry Crash Report: | |||
Attachments: | Error when trying to change Discord's desktop entry |
Description
Roman Nikonov
2022-02-23 00:06:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/768 A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/848 Git commit a4be43231840a145c808f6ce81217f02f03935e8 by Ahmad Samir. Committed on 13/06/2022 at 19:19. Pushed by ahmadsamir into branch 'master'. KPropertiesDialog: fix saving changes when editing a .desktop file symlink Consider the use case of: /usr/share/applications/foo.desktop is symlink to /opt/someapp/foo.desktop relativeAppsLocation() was using QFile::canonicalFilePath(), which meant that foo.desktop would resolve to a file outside /usr/share/applications, since the code, rightly, expects files in QStandardPaths::ApplicationsLocation locations, m_sRelativePath would end up being empty, which makes the check in KFilePropsPlugin::slotCopyFinished() fail, and the .desktop file wouldn't get copied to ~/.local/share/applications/, and the saving would fail. FIXED-IN: 5.96 M +5 -3 src/widgets/kpropertiesdialog.cpp https://invent.kde.org/frameworks/kio/commit/a4be43231840a145c808f6ce81217f02f03935e8 The error message persists on Arch Linux when I try to edit 'Name' field in 'Application' tab of 'Edit application' window of Discord icon present in Favorites list of Kickoff. Operating System: Arch Linux KDE Plasma Version: 5.25.90 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Graphics Platform: Wayland Still seeing this behavior on my machine, when editing any field. I'm particularly interested in adding to the "Environment Variables" field of Telegram flatpak Operating System: Nobara Linux 38 KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.107.0 Qt Version: 5.15.10 Kernel Version: 6.3.12-204.fsync.fc38.x86_64 (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 3600X 6-Core Processor Memory: 31.2 GiB of RAM Graphics Processor: AMD Radeon RX 6700 XT Manufacturer: ASUS *** Bug 451003 has been marked as a duplicate of this bug. *** *** Bug 461941 has been marked as a duplicate of this bug. *** The same happens with LibreOffice in Arch Linux. The libreoffice-fresh package contains files: /usr/lib/libreoffice/share/xdg/calc.desktop - the regular file /usr/share/applications/libreoffice-calc.desktop - a simlink pointing to /usr/lib/libreoffice/share/xdg/calc.desktop Now when I use "Edit Application" action, the file appears: ~/.local/share/applications/libreoffice-calc.desktop but it is not a regular desktop file, instead, it is a symlink to the /usr/lib/libreoffice/share/xdg/calc.desktop The utility should resolve symlinks, and copy the final desktop file, instead of literally copying the desktop file from /usr/share/applications (which could be a symlink). *** Bug 486376 has been marked as a duplicate of this bug. *** |