SUMMARY If you use dolphin as admin and merge two folder, e.g. /usr and then hit CTRL-Z it will delete the entire directory. STEPS TO REPRODUCE 1. Create a /usr folder elsewhere, add directories /bin /lib /share (may only just require /usr not even need to do this I'm not gonna break my system over and over to test lol) and add some files in it. 2. Merge this with the actual /usr folder 3. Hit Ctrl + Z OBSERVED RESULT R.I.P. your system. Softlock (nothing will work as you have no /usr) and rebooting will also not work as it will fail to load into anything, and your TTY will also not work. EXPECTED RESULT Deletion of the merged files ONLY. ArchLinux KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.1 Kernel Version: 6.12.10-arch1-1 (64-bit) Graphics Platform: Wayland ADDITIONAL INFORMATION I was merging https://github.com/joshuar/go-hass-agent 's tar.xz files (/bin/go-hass-agent, /lib/systemd/user/go-hass-agent-service,etc...) with my /usr directory and wanted to make some changes first so I did ctrl-z...everything stopped working, system softlocked. If this happens, timeshift can help you out. Frequent backups are key!
Eek. Now, for future reference, this isn't right right way to achieve what you're trying to do; files like those should be put in /usr/local/, not /usr/ directly. In addition, only your system's package manager and developers should ever be touching /usr/ due to risks of catastrophic breakage like what you experienced. I'd strongly suggest looking for a distro package providing this software, rather than downloading it from a tarball and manually copying files into place. As such, what you're doing is unwise, but there *definitely* shouldn't be data loss here if you opt to do it anyway, *especially* as a result of undoing an operation!
Since this uses admin mode, should this be in kio-admin?
Let's first identify what even is going wrong here. > STEPS TO REPRODUCE > 1. Create a /usr folder elsewhere, add directories /bin /lib /share (may only > just require /usr not even need to do this I'm not gonna break my system over and over to test lol) and add some files in it. 1. So you have two /usr folders. One is in root i.e. "/usr", the other is somewhere else i.e. "/some/other/place/usr" > 2. Merge this with the actual /usr folder 2. You now "merge" the two. I assume this means moving the folder "/some/other/place/usr" to "/", you are then asked what to do because there is already a "usr" folder there and you choose "Merge". > 3. Hit Ctrl + Z I think now it tries to undo the previous move of the folder "/some/other/place/usr" to "/". So it takes the only "/usr" folder that still exists and "puts it back" to "/some/other/place/usr". That's my interpretation of what is happening. I don't think this is an admin-specific issue. If my above interpretation is correct, the issue is that we store the moving of "/some/other/place/usr" to the already existing "/usr" as a creation of a "/usr" folder when in reality it already existed. The solution is probably to not store "moves of folders that already existed" (which are not really "moves" in the first place because a directory with that name already exists) and not have this as something that can be undone. Only the actual move operations on files need to be stored.
(In reply to Felix Ernst from comment #3) > Let's first identify what even is going wrong here. > > > STEPS TO REPRODUCE > > 1. Create a /usr folder elsewhere, add directories /bin /lib /share (may only > > just require /usr not even need to do this I'm not gonna break my system over and over to test lol) and add some files in it. > > 1. So you have two /usr folders. One is in root i.e. "/usr", the other is > somewhere else i.e. "/some/other/place/usr" Correct, > > 2. Merge this with the actual /usr folder > > 2. You now "merge" the two. I assume this means moving the folder > "/some/other/place/usr" to "/", you are then asked what to do because there > is already a "usr" folder there and you choose "Merge". Spot on. > > 3. Hit Ctrl + Z > > I think now it tries to undo the previous move of the folder > "/some/other/place/usr" to "/". So it takes the only "/usr" folder that > still exists and "puts it back" to "/some/other/place/usr". > > That's my interpretation of what is happening. Your assumption on my steps is correct! It may indeed not be an admin issue, but with admin it can cause significant data loss hence why I marked it as an admin bug (this is where I first encountered it). Regarding the other replies yeah I know I wasn't supposed to put it there (@Nate Graham), hence why I did the ctrl+z (one of the changes I wanted to make was putting it in the local folder as I realized that was the wrong place after I put it there...tired brain does dumb things!). I just didn't expect it to nuke my system lol. As to where to file this issue properly (kio-admin?) sorry if I placed it wrong--first time using the bug tracker I tried my best to make sure things were in the proper locations. Please let me know if I need to adjust anything.