nemiver r975 - in trunk: . src/persp/dbgperspective
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r975 - in trunk: . src/persp/dbgperspective
- Date: Sat, 31 Jan 2009 23:51:49 +0000 (UTC)
Author: dodji
Date: Sat Jan 31 23:51:49 2009
New Revision: 975
URL: http://svn.gnome.org/viewvc/nemiver?rev=975&view=rev
Log:
Fix 569168 â Cannot locate source with a full file name
2009-02-01 Dodji Seketeli <dodji redhat com>
* src/persp/dbgperspective/nmv-dbg-perspective.cc:
(DBGPerspective::find_file_in_source_dirs): Don't forget the case
when we are given an absolute path. This patch is from
"Romain TatiÃre" <romain blogreen org>.
Modified:
trunk/ChangeLog
trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
Modified: trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc (original)
+++ trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc Sat Jan 31 23:51:49 2009
@@ -3810,7 +3810,14 @@
string file_name = Glib::filename_from_utf8 (a_file_name),
path,
candidate;
- // first look in the working directory
+ // first check if this is an absolute path
+ if (Glib::path_is_absolute (file_name)) {
+ if (Glib::file_test (file_name, Glib::FILE_TEST_IS_REGULAR)) {
+ a_file_path = Glib::filename_to_utf8 (file_name);
+ return true;
+ }
+ }
+ // then look in the working directory
candidate = Glib::build_filename (m_priv->prog_cwd, file_name);
if (Glib::file_test (candidate, Glib::FILE_TEST_IS_REGULAR)) {
a_file_path = Glib::filename_to_utf8 (candidate);
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]