[GRASS-SVN] r63449 - grass/trunk/display/d.mon
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 9 08:17:36 PST 2014
Author: martinl
Date: 2014-12-09 08:17:36 -0800 (Tue, 09 Dec 2014)
New Revision: 63449
Modified:
grass/trunk/display/d.mon/start.c
Log:
d.mon: store output as full path
Modified: grass/trunk/display/d.mon/start.c
===================================================================
--- grass/trunk/display/d.mon/start.c 2014-12-09 15:14:32 UTC (rev 63448)
+++ grass/trunk/display/d.mon/start.c 2014-12-09 16:17:36 UTC (rev 63449)
@@ -14,13 +14,16 @@
void start(const char *name, const char *output)
{
char *env_name;
+ const char *output_path;
- if (!output)
- return;
-
+ output_path = realpath(output, NULL);
+ if (!output_path) {
+ G_debug(1, "Unable to get full path for '%s'", output);
+ output_path = output;
+ }
env_name = NULL;
G_asprintf(&env_name, "MONITOR_%s_MAPFILE", G_store_upper(name));
- G_setenv(env_name, output);
+ G_setenv(env_name, output_path);
}
/* start wxGUI display monitor */
@@ -73,6 +76,7 @@
G_fatal_error(_("Monitor <%s> already running"), name);
}
+ /* write env file */
tempfile = G_tempfile();
u_name = G_store_upper(name);
More information about the grass-commit
mailing list