Bug 463184 - dolphin: moved files (drag-drop) are not removed (visually) from source directory
Summary: dolphin: moved files (drag-drop) are not removed (visually) from source direc...
Status: RESOLVED DUPLICATE of bug 469254
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 23.04.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-18 08:10 UTC by Koshika
Modified: 2023-05-19 12:09 UTC (History)
6 users (show)

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


Attachments
Screen Grab of the issue (1.80 MB, video/mp4)
2023-05-18 08:41 UTC, Evert Vorster
Details
Screengrab of the issue (1.55 MB, video/mp4)
2023-05-19 07:47 UTC, Evert Vorster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Koshika 2022-12-18 08:10:06 UTC
SUMMARY
when file(s) are drag-and-dropped to another directory, and you opt to "move" in the context menu, the files LOOK-like they remain in the source directory although they are properly moved into the destination directory in the file-system. any activity tried on the now non-existing file entries in the source directory gives you "file non-existing" errors appropriately.  the files are only not shown after a refresh in the dolphin file view pane of the source directory.


STEPS TO REPRODUCE
1. select few file(s)
2. drag-and-drop selected files into another directory/places/tabs
3. opt to "move" in the context menu

OBSERVED RESULT
the files LOOK-like they remain in the source directory although they are properly moved into the destination directory in the file-system. any activity tried on the now non-existing file entries in the source directory gives you "file non-existing" errors appropriately.  the files are only not shown after a refresh in the dolphin file view pane of the source directory.

EXPECTED RESULT
once you opt to "move", the files should disappear from the source directory file-view pane in dolphin since they are no longer in that directory. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro 22.0.0
(available in About System)
KDE Plasma Version: Plasma 5.26.4
KDE Frameworks Version: KDE 5.101.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
dolphin 22.12.0
dolphin-plugins 22.12.0
Comment 1 Koshika 2022-12-18 18:41:34 UTC
seems to be fixed with the patch; https://invent.kde.org/system/dolphin/-/commit/c8aed8ac.patch in latest rebuild of dolphin  in archlinux 22.12.0-2. refer; https://github.com/archlinux/svntogit-packages/commit/20aff7b1dc5402a9abbb3e7c3fd9024a649981bd
Comment 2 Koshika 2023-04-23 15:04:02 UTC
bug present again in dolphin 23.04

Linux/KDE Plasma: Manjaro 22.1.0
(available in About System)
KDE Plasma Version: Plasma 5.27.4
KDE Frameworks Version: KDE 5.105.0
Qt Version: 5.15.9
Comment 3 Méven 2023-05-10 14:06:16 UTC
Does still happen ?

Does it happen in all circumstances ?
Can you specify a detailed step-by-step.

I don't reproduce it personally.

Could be another case of:
https://bugs.kde.org/show_bug.cgi?id=387663

So I would recommend testing after you will have updated to KF 5.106 which has fix for previously quoted file.
Comment 4 Koshika 2023-05-10 15:50:35 UTC
(In reply to Méven from comment #3)
> Does still happen ?
> 
> Does it happen in all circumstances ?
> Can you specify a detailed step-by-step.
> 
> I don't reproduce it personally.
> 
> Could be another case of:
> https://bugs.kde.org/show_bug.cgi?id=387663
> 
> So I would recommend testing after you will have updated to KF 5.106 which
> has fix for previously quoted file.

although not always reproducible, it happens with a high frequency. I'm still on KF 5.105. this started happening again after dolphin 23.04.

steps to reproduce are exactly the same as earlier reported in this bug. the files are moved physically on filesystem where it was dragged to, but the file entries remain in the original directory. 

it is even reproducible while selecting few files, cutting files from one directory and pasting on another directory in another tab. when you go back to the tab where you cut the files from the file entries still remain selected. 

in relevance to the bug you quoted, the difference is this case is, the moved file entries are not removed from the source directory in the move/cut operation in dolphin visually
Comment 5 Koshika 2023-05-16 03:11:34 UTC
> So I would recommend testing after you will have updated to KF 5.106 which
> has fix for previously quoted file.

i'm on KF 5.106 now, and this bug with its other issues seems fixed now.
Comment 6 Koshika 2023-05-16 03:29:46 UTC
i'm afraid not, it has improved still happens time to time with no errors thrown. is there a way to enable debug mode in dolphin to get to the bottom of this
Comment 7 Méven Car 2023-05-16 10:45:54 UTC
(In reply to Koshika from comment #6)
> i'm afraid not, it has improved still happens time to time with no errors
> thrown. is there a way to enable debug mode in dolphin to get to the bottom
> of this

The best way forward would be for me to have a similar video as in https://bugs.kde.org/show_bug.cgi?id=387663#c67 that allowed me to reproduce the issue and determine the origin.

But logs won't help much, I have an idea of the bug origin, somehow dolphin stop listening using inotify for events in the origin folder.
This is similar to the previous case I fixed.
Comment 8 Jin Liu 2023-05-16 10:49:33 UTC
(In reply to Méven Car from comment #7)
> (In reply to Koshika from comment #6)
> > i'm afraid not, it has improved still happens time to time with no errors
> > thrown. is there a way to enable debug mode in dolphin to get to the bottom
> > of this
> 
> The best way forward would be for me to have a similar video as in
> https://bugs.kde.org/show_bug.cgi?id=387663#c67 that allowed me to reproduce
> the issue and determine the origin.

https://bugs.kde.org/show_bug.cgi?id=469254
may help, then.
Comment 9 Koshika 2023-05-17 15:04:41 UTC
(In reply to Jin Liu from comment #8)
> (In reply to Méven Car from comment #7)
> > (In reply to Koshika from comment #6)
> > > i'm afraid not, it has improved still happens time to time with no errors
> > > thrown. is there a way to enable debug mode in dolphin to get to the bottom
> > > of this
> > 
> > The best way forward would be for me to have a similar video as in
> > https://bugs.kde.org/show_bug.cgi?id=387663#c67 that allowed me to reproduce
> > the issue and determine the origin.
> 
> https://bugs.kde.org/show_bug.cgi?id=469254
> may help, then.

i think this is more like it, i checked both directories i was having issues with, both of them are symlinked indeed
Comment 10 Evert Vorster 2023-05-18 08:34:06 UTC
This happens to me too. I am on 106, and have split view open, as well as multiple tabs. 
Dragging and dropping a file and then selecting "move" from the menu moves the file, but the file still appears to be in the original directory.
I can do a quick screengrab, if you want.
Comment 11 Evert Vorster 2023-05-18 08:41:15 UTC
Created attachment 159063 [details]
Screen Grab of the issue

Here is a simple screen recording of the issue. Hopefully it helps.
Comment 12 Méven Car 2023-05-18 09:10:13 UTC
(In reply to Evert Vorster from comment #11)
> Created attachment 159063 [details]
> Screen Grab of the issue
> 
> Here is a simple screen recording of the issue. Hopefully it helps.

I would need to see this from dolphin startup or I can't determine the state at which point the problem occurs.

I would need to know also whether some of your folders are remote folders (nfs / samba) or symlinks, the video does not show.
Comment 13 Evert Vorster 2023-05-19 07:44:30 UTC
Hi there, and thanks for looking into this. 
My external and internal storage is mounted in /mnt/ext and /mnt/int respectively, and then in my home directory I have symlinks to directories on this storage. 

```
lrwxrwxrwx 1 evert evert       20 May  3 18:44  Music -> /mnt/int/media/music
lrwxrwxrwx 1 evert evert       23 May  3 18:44  Pictures -> /mnt/int/media/Pictures
lrwxrwxrwx 1 evert evert       21 May  3 18:44  Public -> /mnt/int/media/Public
lrwxrwxrwx 1 evert evert       23 May  3 18:46  Software -> /mnt/int/media/Software
lrwxrwxrwx 1 evert evert       24 May  3 18:44  Templates -> /mnt/int/media/Templates
lrwxrwxrwx 1 evert evert       21 May  3 18:55  Videos -> /mnt/int/media/Videos
```

Then, in the "Videos" directory I have another symlink to the larger external storage where I keep my footage:
'''
[evert@Evert ~]$ cd Videos
[evert@Evert Videos]$ ls -al
total 4
drwxr-xr-x 1 evert evert  32 Jan  8 17:28 +Involved
drwxr-xr-x 1 evert evert  52 May  3 19:17 .
drwxr-xr-x 1 evert users 232 May  5 16:46 ..
drwxrwxr-x 1 evert users  74 Jul 27  2022 Movies
lrwxrwxrwx 1 evert evert  12 May  3 18:55 Own -> /mnt/ext/Own
drwxr-xr-x 1 evert evert  74 May  3 19:30 Rendered
[evert@Evert Videos]$ 
'''

So, what you saw was Dolphin operating on a directory that is two symlinks deep. I'll attach a video showing Dolphin starting up, but I set it up to start with those directories, so I don't know what you'll get out of that.
Comment 14 Evert Vorster 2023-05-19 07:47:17 UTC
Created attachment 159089 [details]
Screengrab of the issue

Screen grap showing Dolphin starting up, and then immediately having the issue.
Comment 15 Evert Vorster 2023-05-19 07:48:39 UTC
Oh, it's important to note that it's only on the move operation that this happens, for me at least. :)
Comment 16 Evert Vorster 2023-05-19 07:52:59 UTC
It's not quite clear from the video, as I have "Projects" as a quick link in the Panel. 

Here it is in a more traditional way:
'''
[evert@Evert ~]$ cd Videos
[evert@Evert Videos]$ cd Own
[evert@Evert Own]$ cd Projects
[evert@Evert Projects]$ cd Screen\ Captures/
[evert@Evert Screen Captures]$ pwd
/home/evert/Videos/Own/Projects/Screen Captures
[evert@Evert Screen Captures]$ 
'''

Both "Videos" and "Own" are symlinks.
Comment 17 Evert Vorster 2023-05-19 08:01:27 UTC
Oh, one more thing... /home itself is a bind mount from /mnt/int/home, defined in fstab.

Yes, I know I do loads of funky mounting and symlinks and binds, but this is because I do frequent backups and that's easier when all the data directories that change often are in one place. Also, I can change my flavor of distro or re-install from scratch, and all my data is safe on another filesystem.
Comment 18 Méven Car 2023-05-19 12:09:38 UTC
(In reply to Evert Vorster from comment #17)
> Oh, one more thing... /home itself is a bind mount from /mnt/int/home,
> defined in fstab.
> 
> Yes, I know I do loads of funky mounting and symlinks and binds, but this is
> because I do frequent backups and that's easier when all the data
> directories that change often are in one place. Also, I can change my flavor
> of distro or re-install from scratch, and all my data is safe on another
> filesystem.

Thank you for your answer, it is very helpful, this is now actionable.

The fact that those folders were symlinks are an important factor for this issue.
That's the kind of input to specify in a bug report, when your setting or context is not what anyone would have by default.
Just saying, for a next eventual report.

The good news is I have a fix proposal in MR https://invent.kde.org/frameworks/kio/-/merge_requests/1285

This makes bug a duplicate of https://bugs.kde.org/show_bug.cgi?id=469254

*** This bug has been marked as a duplicate of bug 469254 ***