Menu

#26 No error shown for non-readable files

open
nobody
None
5
2006-01-23
2006-01-23
Anonymous
No

I stumbled the other day when KCacheGrind seemed to
refuse to open any files. It turned out that they
simply weren't readable by my username (I had run
valgrind as 'nobody').

Perhaps an error could be shown if a file is not
readable.

Cheers!

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I decided to fix this myself, as it was beginning to bug me. A diff from current SVN (543959) is below:

    Index: kcachegrind/kcachegrind/toplevel.cpp

    --- kcachegrind/kcachegrind/toplevel.cpp (revision 543592)
    +++ kcachegrind/kcachegrind/toplevel.cpp (working copy)
    @@ -54,6 +54,7 @@
    #include <ktip.h>
    #include <kpopupmenu.h>
    #include <kdebug.h>
    +#include <kmessagebox.h>

    #if ENABLE_DUMPDOCK
    #include "dumpselection.h"
    @@ -1032,6 +1033,11 @@

    loadTrace(tmpFile);
    KIO::NetAccess::removeTempFile( tmpFile );
    + } else {
    + KMessageBox::error(this,
    + i18n("The selected file could not be read (check permissions?)."),
    + i18n("Error reading file"),
    + 0);
    }
    }

     
  • Josef Weidendorfer

    Logged In: YES
    user_id=621915

    Thanks for the patch. For KDE 3.5, I am not sure if
    string additions are allowed, so this has to wait a
    bit (I'll keep this bug open).
    For KDE4, I will apply it to the trunk.

     

Log in to post a comment.