Bug 428112 - Changing XDG folder locations in the KCM does not update items in the Places Model that point to the old location
Summary: Changing XDG folder locations in the KCM does not update items in the Places ...
Status: CLOSED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_desktoppath (show other bugs)
Version: 5.21.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
: 432922 440110 451405 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-22 21:08 UTC by Andrés B.S.
Modified: 2023-02-25 21:28 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25


Attachments
This submenu (151.93 KB, image/png)
2020-10-22 21:08 UTC, Andrés B.S.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrés B.S. 2020-10-22 21:08:58 UTC
Created attachment 132643 [details]
This submenu

SUMMARY
After changing the Downloads folder at Locations (System Settings), the submenu "Computer" contains a link to the old Downloads folder, instead of the new one.

Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.71.0
Qt Version: 5.12.7

This was reproducible on the newest Tumbleweed snapshot (10/20/20 IIRC), as well.

In order to prevent confusion, I'll attach a picture of the submenu I am talking about.
Comment 1 Justin Zobel 2020-10-23 03:24:43 UTC
Confirmed on:
Operating System: Solus 4.1
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

Even logging out and logging in doesn't update the path it leads you to.
Comment 2 Nate Graham 2021-01-07 19:10:08 UTC
I guess the model doesn't get notified of the update.
Comment 3 Andrés B.S. 2021-01-07 20:53:27 UTC
Feel free to close if you want, due to the new Kickoff (I wasn't aware of it when reported).

Unless the issue persists there, of course.
Comment 4 Andrés B.S. 2021-02-19 05:17:12 UTC
Just confirmed, the issue persists on 5.21.0
(I haven't changed any folder settings since my previous comment)
Comment 5 Nate Graham 2021-02-19 15:56:09 UTC
The issue here is that changing the value in the KCM doesn't update any Places model items that have the old location to point to the new location. So all the links are broken and you need to manually fix them.

Two potential solutions:
1. Have the KCM update the items in the Places model
2. Have the Places model itself use the XDG environment variables for the paths, which do get updated.

Downside of 1 is having to mess with user data
Downside of 2 is that if the user customizes the path, that custom path will be serialized into the config and it won't use an XDG envar path anymore, so it will break.

I'll move this to System Settings for now to investigate option 1. If that doesn't work, we can investigate doing option 2.
Comment 6 Nate Graham 2021-02-19 15:57:05 UTC
*** Bug 432922 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2021-11-08 21:19:17 UTC
*** Bug 445082 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2022-03-25 03:40:24 UTC
*** Bug 451405 has been marked as a duplicate of this bug. ***
Comment 9 tneo 2022-03-25 17:30:20 UTC
@Nathan, sorry I did not find this issue when searching.

When you change the location for Downloads that is populated correctly. All others fail to be populated correctly under places in Dolphin.
Comment 10 Nate Graham 2022-04-22 17:14:31 UTC
*** Bug 440110 has been marked as a duplicate of this bug. ***
Comment 11 Roo 2022-04-29 04:06:17 UTC
I have the same issue Arch Linux 
KDE Plasma version 5.24.4
KDE Framework Version 5.93.0
Qt Version 5.15.3
Dolphin Version 21.12.3
Go to System Settings Applications  Locations
Set Downloads Path to /mnt/hunter/drive2/Downloads
Issue Dolphin does not change the path to the Downloads folder or in the Places side bar like it used to.
All other Applications for example Firefox, Google Chrome, Gwenview, qbittorrent, ONLYOFFICE etc do use the changed location only Dolphin does not.
Comment 12 Méven Car 2022-05-03 08:45:05 UTC
Git commit 038df61222ff67cc72ee266e92aa5d3ec0172a64 by Méven Car.
Committed on 03/05/2022 at 08:38.
Pushed by meven into branch 'master'.

KCM desktop Paths: update places when xdg paths change

M  +2    -0    kcms/desktoppaths/CMakeLists.txt
M  +17   -0    kcms/desktoppaths/desktoppathssettings.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/038df61222ff67cc72ee266e92aa5d3ec0172a64
Comment 13 LUBE 2023-02-24 10:40:18 UTC Comment hidden (spam)
Comment 14 Nate Graham 2023-02-24 14:19:18 UTC Comment hidden (spam)
Comment 15 Kjetil Kilhavn 2023-02-25 21:28:57 UTC
(In reply to LUBE from comment #13)
> I have the same Problem in the newest version after a User Rename.
> everything is still pointing to /home/[oldusername]/...

I guess you are experiencing the problem I reported, which in my opinion erroneously was marked as a duplicate of this one.
You should therefore probably reopen https://bugs.kde.org/show_bug.cgi?id=445082 instead, but please check my description first to ensure it actually is the same problem you are experiencing.