[GRASS-SVN] r67045 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Dec 9 07:44:16 PST 2015
Author: martinl
Date: 2015-12-09 07:44:16 -0800 (Wed, 09 Dec 2015)
New Revision: 67045
Modified:
grass/trunk/lib/gis/env.c
Log:
libgis: turn r67044 into debug (no fatal error)
Modified: grass/trunk/lib/gis/env.c
===================================================================
--- grass/trunk/lib/gis/env.c 2015-12-09 14:05:05 UTC (rev 67044)
+++ grass/trunk/lib/gis/env.c 2015-12-09 15:44:16 UTC (rev 67045)
@@ -152,10 +152,7 @@
parse_env(fd, loc);
fclose(fd);
}
-
- if (!fd) /* reading failed, call fatal error */
- G_fatal_error(_("Unable to read GISRC <%s>: %s"), loc, strerror(errno));
-
+
G_initialize_done(&st->init[loc]);
return 0;
}
@@ -172,9 +169,6 @@
parse_env(fd, loc);
fclose(fd);
}
-
- if (!fd) /* reading failed, call fatal error */
- G_fatal_error(_("Unable to read GISRC <%s>: %s"), loc, strerror(errno));
}
@@ -310,11 +304,12 @@
static FILE *open_env(const char *mode, int loc)
{
char buf[GPATH_MAX];
+ FILE *fd;
if (loc == G_VAR_GISRC) {
if (!st->gisrc)
st->gisrc = getenv("GISRC");
-
+
if (!st->gisrc) {
G_fatal_error(_("GISRC - variable not set"));
return NULL;
@@ -329,7 +324,11 @@
sprintf(buf, "%s/%s/VAR", G_location_path(), G_mapset());
}
- return fopen(buf, mode);
+ fd = fopen(buf, mode);
+ if (!fd) /* reading failed, call fatal error */
+ G_debug(1, "Unable to read GISRC <%s>: %s", buf, strerror(errno));
+
+ return fd;
}
/*!
More information about the grass-commit
mailing list