Bug 345459 - Changing 'Downloads' default path attempts to move *ALL* files in $HOME to new location
Summary: Changing 'Downloads' default path attempts to move *ALL* files in $HOME to ne...
Status: RESOLVED DUPLICATE of bug 345729
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_desktoppath (show other bugs)
Version: 5.2.1
Platform: Gentoo Packages Linux
: NOR critical
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-24 02:56 UTC by Steve Gilberd
Modified: 2015-04-09 18:00 UTC (History)
2 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 Steve Gilberd 2015-03-24 02:56:14 UTC
Changing the default 'Download' path, then selecting 'yes' when asked whether I would like existing files to be moved to the new location results in an attempt to move *ALL* files in $HOME to $NEW_DOWNLOADS_DIR/$USER/. This completely trashes the user's homedir.

If the new destination is an ephimeral location such as /tmp, the files may be permanently lost if the user does not know where their files have gone before the destination is cleared.

Reproducible: Always

Steps to Reproduce:
1. Ensure that the current default downloads (~/Downloads) directory exists.
2. In System Settings >> Applications >> Paths, change the default directory to a new location.
3. When asked whether to move existing files, choose 'Yes'.

Actual Results:  
Without any further prompting, an attempt is made to move everything in the user's home directory into a subfolder of the new default download location (i.e. move $HOME/* to $NEW_DOWNLOAD_TARGET/$USERNAME/*).

Expected Results:  
The contents of the current default download location should be moved to the new default download location. *ONLY* these files should be moved. Everything else in the user's home directory should be left untouched.

This was reproduced on a new gentoo system, using @kde-frameworks-5.7 and @kde-plasma-5.2.
Comment 1 Steve Gilberd 2015-03-24 02:57:22 UTC
This may be a regression - a similar issue was previously reported in 2009 in bug #193057, but that bug was marked as fixed several years ago.
Comment 2 David Edmundson 2015-04-09 16:11:57 UTC
I've tried and I can't reproduce this at all, with 10 minutes of every combination I can think of.

I don't suppose you could try reproducing it?

Can I see the contents of .config/user-dirs.dirs? before and after changing.

Do you remember if the prompt said the right thing (i.e did it say moving $home/downloads or did it it say $home).
Comment 3 David Edmundson 2015-04-09 16:15:10 UTC
Can you tell me what your home directory is (echo $HOME)
Comment 4 David Edmundson 2015-04-09 17:37:52 UTC

*** This bug has been marked as a duplicate of bug 345729 ***
Comment 5 David Edmundson 2015-04-09 18:00:53 UTC
Fixed. Thanks ever so much for reporting. I hope you didn't lose anything valuable.