Bug 438492 - Updating plasma to 5.22 deleted my Downloads folder, and created a new, empty one in my language
Summary: Updating plasma to 5.22 deleted my Downloads folder, and created a new, empty...
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_desktoppath (other bugs)
Version First Reported In: 5.22.0
Platform: Arch Linux Linux
: VHI critical
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-06-12 06:55 UTC by vakondvilmos
Modified: 2021-07-19 22:52 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vakondvilmos 2021-06-12 06:55:03 UTC
SUMMARY


STEPS TO REPRODUCE
1. Set a primary language that's not english (in my case hungarian)
2. Update to 5.22

OBSERVED RESULT
The update not only changed the names of my home dir folders, but deleted my Downloads folder completely. I am also not able to change them back to english, becuase removing hungarian completely seems to have no effect on xdg-user-dirs-update , and it just recreates the hungarian folders, even after manually deleting the user-dirs.dirs and user-dirs.locale files in .config. I even tried manually changing user-dirs.locale to en_US, but it just pops back to hu_HU(even though I completely removed that from system settings). I was not able to reproduce the bug with xdg-user-dirs-update, it seems to be directly tied to the plasma update (I didn't try rolling back and updating again, so it might not be reproducible).

EXPECTED RESULT
First, it shouldn't delete my files. That's extremely bad behavior. Second, I should be able to set my home default folders back to english without any issues.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.12.9-arch1-1 Archlinux/5.22 KDE Plasma
(available in About System)
KDE Plasma Version: 5.22
KDE Frameworks Version: 5.82
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-06-15 22:47:26 UTC
Jesus.

Męven, can you investigate? I suspect this is related to the localized XDG dirs stuff you worked on.
Comment 2 Nate Graham 2021-06-15 22:47:50 UTC
I mean Méven, of course. :)
Comment 3 Méven Car 2021-06-16 07:43:00 UTC
(In reply to Nate Graham from comment #1)
> Jesus.
> 
> Męven, can you investigate? I suspect this is related to the localized XDG
> dirs stuff you worked on.

The part where now default paths are translated in the kcm desktoppaths is due to https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/252/diffs but not the rest.

> The update not only changed the names of my home dir folders, but deleted my Downloads folder completely

I suspect this is not be due to KDE software, but xdg-utils or Archlinux scripts.
I don't think we have any code that would delete or even move a xdg-desktoppaths, we rely on `xdg-user-dirs-update` for this.

> I mean Méven, of course. :)
No worries if you don't include the accent in my first-name, it is not even on your keyboard.

> I even tried manually changing user-dirs.locale to en_US

Well if the local in user-dirs.locale does not match your current local, it means the file is outdated (and user-dirs.dirs) and should be ignored, it is what happens in your case.

Removing `user-dirs.dirs` and `user-dirs.locale` and running `xdg-user-dirs-update` will recreate the dirs based on your local the same way.

What you want is to keep user-dirs.locale to your local, hu_HU, and edit the values in user-dirs.dirs either using xdg-user-dirs-update or the kcm desktoppaths:

xdg-user-dirs-update --set DOWNLOAD $HOME/Downloads (then relaunch systemsettings to have it take into account in the KCM).

> I was not able to reproduce the bug with xdg-user-dirs-update

What did you do exactly to say that ?
Comment 4 David Edmundson 2021-06-18 09:58:29 UTC
>I don't think we have any code that would delete or even move a xdg-desktoppaths, we rely on `xdg-user-dirs-update` for this.

We do not (we used to aaages ago but it was removed)
Reporter also mentions this happening after upgrade, changes to a KCM won't be relevant unless the KCM is run.

It's worth mentioning Arch has a bug in xdg-user-dirs. Downstream they've created a systemd unit file that runs /really/ early in the user boot process, before locale has been set regardless of which plasma mode is used. I don't know how that could ever work properly (found from an offtopic discussion at https://github.com/systemd/systemd/issues/18791#issuecomment-788930477).

I don't think we can do much as Plasma until something is proved otherwise.
Comment 5 vakondvilmos 2021-06-18 12:38:35 UTC
(In reply to Méven Car from comment #3)
> (In reply to Nate Graham from comment #1)
> > Jesus.
> > 
> > Męven, can you investigate? I suspect this is related to the localized XDG
> > dirs stuff you worked on.
> 
> The part where now default paths are translated in the kcm desktoppaths is
> due to
> https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/252/diffs but
> not the rest.
> 
> > The update not only changed the names of my home dir folders, but deleted my Downloads folder completely
> 
> I suspect this is not be due to KDE software, but xdg-utils or Archlinux
> scripts.
> I don't think we have any code that would delete or even move a
> xdg-desktoppaths, we rely on `xdg-user-dirs-update` for this.
> 
> > I mean Méven, of course. :)
> No worries if you don't include the accent in my first-name, it is not even
> on your keyboard.
> 
> > I even tried manually changing user-dirs.locale to en_US
> 
> Well if the local in user-dirs.locale does not match your current local, it
> means the file is outdated (and user-dirs.dirs) and should be ignored, it is
> what happens in your case.
> 
> Removing `user-dirs.dirs` and `user-dirs.locale` and running
> `xdg-user-dirs-update` will recreate the dirs based on your local the same
> way.
> 
> What you want is to keep user-dirs.locale to your local, hu_HU, and edit the
> values in user-dirs.dirs either using xdg-user-dirs-update or the kcm
> desktoppaths:
> 
> xdg-user-dirs-update --set DOWNLOAD $HOME/Downloads (then relaunch
> systemsettings to have it take into account in the KCM).
> 
> > I was not able to reproduce the bug with xdg-user-dirs-update
> 
> What did you do exactly to say that ?

Now that you clarified how the locale setting which I changed does not have any effect, what I did wouldn't be able to reproduce the bug anyway, so it might be reproducible by properly changing back the locale, running xdg-user-dirs-update, changing the locale again, and re-running it. But I think it is clear at this point that I don't have nearly enough knowledge to help you. I set back everything to hungarian, so another update won't do any harm hopefully.
Comment 6 Bug Janitor Service 2021-07-03 04:33:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 David Edmundson 2021-07-19 22:52:45 UTC
Ok, I'm sorry for your files, but I'm afraid we can't do much at this point.

We've done a check our side, we can't find anything that points to KDE. If you can make a reproducible case in a VM we can investigate again, but at this point leaving this open won't help