| Summary: | Krusader shows negative percent values while searching the text with the excepted folder | ||
|---|---|---|---|
| Product: | [Applications] krusader | Reporter: | pveax <pveax> |
| Component: | search | Assignee: | Krusader Bugs Distribution List <krusader-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | krusader-bugs-null, toni.asensi |
| Priority: | NOR | ||
| Version First Reported In: | Git | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/krusader/commit/04e6286f952703a23672989ce14255488f47a064 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: |
search criteria
negative value Confirmed (1) - negative percentage. Confirmed (2) - positive but incorrect percentage. on the 2.8.0.dev.r6378.gae1bf6b9-1 version |
||
|
Description
pveax
2020-04-02 15:46:56 UTC
Created attachment 127206 [details]
search criteria
Created attachment 127207 [details]
negative value
Can reproduce just the same in Krusader v2.7.2 on ``` Operating System: Manjaro Linux KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.76.0 Qt Version: 5.15.2 Kernel Version: 5.10.0-1-MANJARO OS Type: 64-bit ``` Too old. Current Krusader and Plasma went into future. > [From https://bugs.kde.org/show_bug.cgi?id=419539]
> Now Krusader and Plasma got updates, so the bug is old.
> Will looking into newer Krusader version (git).
Thanks, pveax. Please, feel free to reopen this bug report if you still find that problem.
Created attachment 141698 [details]
Confirmed (1) - negative percentage.
Created attachment 141699 [details]
Confirmed (2) - positive but incorrect percentage.
After some investigation, it's seen that there's a problem when the contents of a big symlinked file are read, because then the variable `totalBytes` is very small (it's the size of a symlink) but much more bytes bytes are read. That causes huge unreal percentages and sometimes negative values (I attached some screenshots). There's a proposal on https://invent.kde.org/utilities/krusader/-/merge_requests/71 Created attachment 141810 [details]
on the 2.8.0.dev.r6378.gae1bf6b9-1 version
OK, I switched into git version (and that report also):
```
$ pacman -Qi krusader | grep Version
Version : 2.8.0.dev.r6378.gae1bf6b9-1
```
I still see positive percentage.
I switched Krusader version in the ticket into the `Git` value, as I see the lack on it also. ``` Operating System: Manjaro Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: 5.15.0-1-MANJARO (64-bit) Graphics Platform: Wayland ``` > I still see [...] Just in case any reader is wondering: The https://invent.kde.org/utilities/krusader/-/merge_requests/71 proposal still has not been accepted, so it still has not been applied to the git version of Krusader :-) Git commit 04e6286f952703a23672989ce14255488f47a064 by Toni Asensi Esteve. Committed on 17/10/2021 at 18:44. Pushed by asensi into branch 'master'. Correct percentages when searching text inside files Solve some problems showing percentages when the contents of a big symlinked file were read because then the variable `totalBytes` was very small (it was the size of a symlink) but much more bytes bytes were read. That caused huge unreal percentages and sometimes negative values. FIXED: [ 419547 ] Krusader shows negative percent values while searching the text with the excepted folder Revision: https://invent.kde.org/utilities/krusader/-/merge_requests/71 M +12 -4 krusader/FileSystem/krquery.cpp https://invent.kde.org/utilities/krusader/commit/04e6286f952703a23672989ce14255488f47a064 "Correct percentages when searching text inside files"
Tested. Indeed: it's done! Values of billions of percentages in the past.
> Reported: 2020-04-02 15:46 UTC
> Modified: 2021-10-17 18:45 UTC
Hooray! That's the point there the life starts! :)
Beer to all!
Toni, Thank yoooouuuuu!!!
|