[Bug 72547] kdevelop doesn't chekc file permissions: no error message if file not executable

Vladimir Prus ghost at cs.msu.su
Fri Aug 19 13:58:05 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=72547         
ghost cs msu su changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From ghost cs msu su  2005-08-19 12:48 -------
SVN commit 450870 by vprus:

Before running debugger, check if application is indeed executable.

BUG: 72547


 M  +19 -1     gdbcontroller.cpp  


--- branches/KDE/3.5/kdevelop/languages/cpp/debugger/gdbcontroller.cpp #450869:450870
 @ -1472,7 +1472,25  @
             // Note: script could contain "run" or "continue"
         }
         else {
-            queueCmd(new GDBCommand("run", RUNCMD, NOTINFOCMD, 0));
+
+            // The program is run locally. Need the make sure it's executable,
+            // just in case.
+            QFileInfo app(application_);
+            if (app.isExecutable())
+            {
+                queueCmd(new GDBCommand("run", RUNCMD, NOTINFOCMD, 0));
+            }
+            else
+            {
+                KMessageBox::error(
+                    0, QString(
+                        i18n("<b>Could not run application '%1'.</b>"
+                             "<p>The application does not have the executable bit set. "
+                             "Try rebuilding the project, or change permissions "
+                             "manually."
+                            )).arg(app.fileName()),
+                    i18n("Could not run application"));
+            }
         }
     }
     else {




More information about the KDevelop-devel mailing list