Summary: | F3 and Shift+F3 don't show error message if file has no read permission or it's a symlink to such file | ||
---|---|---|---|
Product: | [Applications] krusader | Reporter: | Toni Asensi Esteve <toni.asensi> |
Component: | krviewer | Assignee: | Krusader Bugs Distribution List <krusader-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | krusader-bugs-null, nikita+kde |
Priority: | NOR | Keywords: | triaged |
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | error dialog for F3 |
Description
Toni Asensi Esteve
2018-06-22 10:13:31 UTC
On my side: 1. If Shift+F3 is used, nothing happens - no error, no opening and closing windows. It's a bug. 2. For F3, a correct error dialog is shown. I'll attach a screenshot. Created attachment 113618 [details]
error dialog for F3
> 2. For F3, a correct error dialog is shown. I'll attach a screenshot.
Thanks, Nikita! I've tried pressing F3 on /swapfile and I see the same error message as you see, although pressing F3 on /vmlinuz.old I don't see any error dialog (just a window that is closed immediately). :-?
Those are the permission of those files:
$ ll /swapf* /vm*
-rw------- 1 root root 545367040 abr 23 10:31 /swapfile
lrwxrwxrwx 1 root root 30 jun 17 16:08 /vmlinuz -> boot/vmlinuz-4.15.0-23-generic
lrwxrwxrwx 1 root root 30 jun 17 16:08 /vmlinuz.old -> boot/vmlinuz-4.15.0-22-generic
$ ll /boot/vmlinuz-4.15.0-23-generic
-rw------- 1 root root 8257272 may 23 19:49 /boot/vmlinuz-4.15.0-23-generic
If I execute
less /vmlinuz.old; less /swapfile; less /non_existant_file
then I see
/vmlinuz.old: Permission denied
/swapfile: Permission denied
/non_existant_file: No such file or directory
but using F3 to see /vmlinuz.old (or /vmlinuz) I don't see any error message (at least using Kubuntu 18.04), does it happen to you, Nikita?
If I go to the /boot/ file and I use F3 to view all the vmlinuz* files, everything works as it's expected. Maybe the problem is in panelfunc.cpp, in if (!fileitem->isReadable()) { KMessageBox::sorry(0, i18n("No permissions to view this file.")); return; } // call KViewer. KrViewer::view(files()->getUrl(fileName)); // nothing more to it! because the user can't read /vmlinuz (nor vmlinuz.old) but `fileitem->isReadable()` says that it is readable (because it's only inspecting the symlink file)? I confirm that if you press F3 on a symlink to a file which doesn't have read permission, nothing happens (I don't see any windows that are closed immediately). Updated summary line. This bug report is possibly related to https://bugs.kde.org/show_bug.cgi?id=396132 Thanks, Nikita! |