Commit 0e4f31fd authored by Naba Kumar's avatar Naba Kumar

Fixed bug #476028. Now anjuta also searches for file relative to top

	* src/anjuta.c: Fixed bug #476028.
	  Now anjuta also searches for file relative to top project dir,
	  when the project is open.
parent f7de1393
......@@ -32,7 +32,11 @@
that the auto-detected mode is not overridden by the default mode.
* src/text_editor.c, aneditor.c: Disabled #DEBUG flag.
* src/anjuta.c: Fixed bug #476028.
Now anjuta also searches for file relative to top project dir,
when the project is open.
2002-01-25 Naba Kumar <kh_naba@users.sourceforge.net>
* src/an_symbol_view.c: Added MAX_STRING_LENGTH
......
......@@ -1482,6 +1482,7 @@ anjuta_get_full_filename (gchar * fn)
{
gchar *src_dir;
/* See if it on of the source files */
src_dir = project_dbase_get_module_dir (app->project_dbase, MODULE_SOURCE);
dummy = g_strconcat (src_dir, "/", fn, NULL);
g_free (src_dir);
......@@ -1491,6 +1492,18 @@ anjuta_get_full_filename (gchar * fn)
return dummy;
}
g_free (dummy);
/* See if the file is relative to the top project dir */
src_dir = app->project_dbase->top_proj_dir;
if (src_dir) {
dummy = g_strconcat (src_dir, "/", fn, NULL);
if (file_is_regular (dummy) == TRUE)
{
g_free (cur_dir);
return dummy;
}
g_free (dummy);
}
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment