FIXED: [ 409722 ] Krusader crash when trying to view any archive using the ark part
BUG: 409722
Details
- Reviewers
nmel gengisdave - Group Reviewers
Krusader - Commits
- R167:c264e2a3deed: Avoid that Krusader crashes when trying to view any archive using the ark part
In one tab of e.g. Konsole execute:
touch /tmp/really_empty.zip ln -s /dev/zero /tmp/too_big.zip zip /tmp/no_access.zip /etc/fstab chmod a-rwx /tmp/no_access.zip krusader -d
Press F3 to try to view a compressed file
See in the Konsole tab:
[...]-debug default PanelViewer::openFile(KFileItem)::<lambda@281 # openFile completed: ' QUrl("file:///[...]") '
Close the window of the viewer.
Press F3 to try to view /tmp/really_empty.zip
See in the Konsole tab:
[...]-debug default PanelViewer::openFile(KFileItem)::<lambda@275 # openFile canceled: ' QUrl("file:///tmp/really_empty.zip") '
Close the window of the viewer.
Press F3 to try to view /tmp/too_big.zip
See a viewer window with the message:
The file /dev/zero could not be loaded, as it was not possible to read from it. Check if you have read access to this file. [Try Again] [Close]
press the "Try Again" button. See in the Konsole tab:
[...]-debug default PanelViewer::openFile(KFileItem)::<lambda@275 # openFile canceled: ' QUrl("file:///tmp/too_big.zip") '
Close the window of the viewer.
Press F3 to try to view /tmp/no_access.zip
See a "No permissions to view this file" message.
Try F3 to view other kind of files like text, jpg, html, etc.
Diff Detail
- Repository
- R167 Krusader
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Haven't tested the patch, but the change looks good to me.
krusader/KViewer/panelviewer.cpp | ||
---|---|---|
263–268 | I'd put this information in the commit message instead. Comments gets outdated pretty easily ;) |
Some tests were also performed by Moritz Bunkus (https://bugs.kde.org/show_bug.cgi?id=411446#c10) and he didn't see any problem.
Thanks Elvis, Nikita, Davide, and Moritz :-)