Bug 374404 - when copy in folder, free space info (in the upper left of panel Krusader) is not refreshed but Ctrl+R is refreshing it
Summary: when copy in folder, free space info (in the upper left of panel Krusader) is...
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-31 21:14 UTC by kdebug
Modified: 2018-05-06 00:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kdebug 2016-12-31 21:14:45 UTC
Reproducible: Always

Steps to Reproduce:
1. Copy big file by F5 from one panel to another. (It can be the same directory or different, it does not matter.)
2. See, that free space info (in the upper left of panel) is not updated.
3. You can update it with Ctrl+R

Additional Information: 
When you delete file via external program (konsole/qubittorrent) free space info can be updated or not. I can not find how to make it always reproducible

Actual Results:
when copy in folder, free space info (in the upper left of panel Krusader) is not refreshed but Ctrl+R is refreshing it 

Expected Results: 
when copy in folder, free space info (in the upper left of panel Krusader) is refreshed

kde-misc/krusader:5-git-4d509bb88b6b8bf40050e1d83af9611362bfaa6a
kde-plasma/plasma-meta-5.8.4
KDE Frameworks 5.29.0
Qt 5.7.1 (built against 5.7.1)
Comment 1 Alex Bikadorov 2017-01-01 15:51:35 UTC
cannot reproduce. This is what I tried:

* show folder /tmp (mounted with tmpfs) in both panels.
* copy big file (500mb) with F5 from one panel to the other -> space info updated in both panels
* same with drag&drop
* same with local filesystem: folder /tmp_local, filesystem is ext4

* when deleting a file inside krusader, space info is also always updated in same panel
* when deleting a file externally, space info is updated if filesystem is local and panel was showing the folder with the deleted file

exceptions:

when panels do NOT show the same folder:
* when copying from one panel to other panel, source panel space info is not updated
* when deleting file in one panel, other panel space info is not updated

But there never was support for that.

* when deleting/changing files shown in panel folder externally and filesystem is not local (=no inotify support), automatic update is not possible

Hope, it is clear now what is supported and what is not.
What filesystem are you using?
Comment 2 kdebug 2017-01-01 19:06:42 UTC
filesystem is ext4

I'm tried to copy the file from /tmp/test1/ to /tmp/test2/ and recorded the video.

https://vid.me/JRpY

Then tried to copy the file from /tmp/test1/ to /tmp/test1/ with renaming the file and recorded the video.

https://vid.me/bT3u

In both case the free-space info is not updated in the target panel.

Is this the correct behavior? If it not, what is the additional info i can provide?
Comment 3 Alex Bikadorov 2017-01-03 19:47:02 UTC
Got it now. I simply had to copy a bigger file (2GB) to trigger the bug, my ssd was too fast.

See https://phabricator.kde.org/D3938
Comment 4 kdebug 2017-01-03 22:57:36 UTC
With help of the eapply_user mechanism, i'm recompiled krusader with your patch. It's work ok now even with symlinked dirs from different hdd's. Thank you.
Comment 5 Alex Bikadorov 2017-01-04 15:30:17 UTC
Git commit fe59dc1e9abb08589cba770ac354af2fe5e64b41 by Alexander Bikadorov.
Committed on 03/01/2017 at 18:47.
Pushed by abikadorov into branch 'master'.

Rework of filesystem info and space update after refresh and file operation. Part of cleaning VFS

M  +24   -66   krusader/Panel/listpanel.cpp
M  +2    -1    krusader/Panel/listpanel.h
M  +1    -0    krusader/Panel/panelfunc.cpp
M  +26   -5    krusader/VFS/default_vfs.cpp
M  +5    -1    krusader/VFS/default_vfs.h
M  +16   -3    krusader/VFS/krvfshandler.cpp
M  +2    -8    krusader/VFS/vfs.cpp
M  +13   -8    krusader/VFS/vfs.h
M  +4    -4    krusader/VFS/virt_vfs.cpp
M  +0    -3    krusader/VFS/virt_vfs.h

https://commits.kde.org/krusader/fe59dc1e9abb08589cba770ac354af2fe5e64b41
Comment 6 Alex Bikadorov 2017-01-04 15:30:18 UTC
Git commit 14d7c25fc0705deff677c8ea344f9c3ddbbcf579 by Alexander Bikadorov.
Committed on 03/01/2017 at 19:37.
Pushed by abikadorov into branch 'master'.

VFS: cleaner code for refresh check on vfs operation without current directory

Summary:
Rework of filesystem info and space update after refresh and file operation. Part of cleaning VFS

VFS: cleaning inheritance issues with VFS classes. Part of cleaning VFS

Test Plan:
Checked panels filesystem stats update in both panels (+tabs) when
* copying file on local fs with {F5/copy, drag&drop, copy/paste}
* deleting file on local fs
* creating virtual directory from search result ("feed to listbox")
* changing directory/refreshing to different fs

Reviewers: #krusader

Differential Revision: https://phabricator.kde.org/D3938

M  +8    -9    krusader/VFS/default_vfs.h
M  +4    -4    krusader/VFS/vfs.h
M  +0    -2    krusader/VFS/virt_vfs.cpp
M  +0    -1    krusader/VFS/virt_vfs.h

https://commits.kde.org/krusader/14d7c25fc0705deff677c8ea344f9c3ddbbcf579
Comment 7 Alex Bikadorov 2017-01-04 15:30:18 UTC
Git commit 5cf6278f259e352a1fff7bd4b2d659b593c639e7 by Alexander Bikadorov.
Committed on 04/01/2017 at 15:30.
Pushed by abikadorov into branch 'master'.

VFS: cleaner code for refresh check on vfs operation without current directory

Summary:
Rework of filesystem info and space update after refresh and file operation. Part of cleaning VFS

VFS: cleaning inheritance issues with VFS classes. Part of cleaning VFS

---

The bug report https://bugs.kde.org/show_bug.cgi?id=374404 made me notice some flaws with the current file space refresh. I couldn't help myself and changed most of the code.

Behaviour changes:
* free space update should work now flawless. I.e. if changes to the filesystem space are made inside Krusader all panels (and tabs) showing the same filesystem are updated
* no special label for /etc and /proc anymore. I feel its fine to show "0 of of 0 bytes" here. And /sys was missing anyway.
* "Virtual Filesystem" is shown now if "virt_fs" is used (and no search meta information is present).

Test Plan:
Checked panels filesystem stats update in both panels (+tabs) when
* copying file on local fs with {F5/copy, drag&drop, copy/paste}
* deleting file on local fs
* creating virtual directory from search result ("feed to listbox")
* changing directory/refreshing to different fs

Reviewers: #krusader, martinkostolny, asensi

Reviewed By: #krusader, martinkostolny, asensi

Subscribers: asensi, martinkostolny

Differential Revision: https://phabricator.kde.org/D3938


https://commits.kde.org/krusader/5cf6278f259e352a1fff7bd4b2d659b593c639e7
Comment 8 Alex Bikadorov 2017-01-04 15:42:25 UTC
Thanks for report and testing!