[GRASS-SVN] r67970 - grass/branches/releasebranch_7_0/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 27 14:14:53 PST 2016
Author: mmetz
Date: 2016-02-27 14:14:53 -0800 (Sat, 27 Feb 2016)
New Revision: 67970
Modified:
grass/branches/releasebranch_7_0/lib/raster/open.c
Log:
rasterlib: check for compressed null file
Modified: grass/branches/releasebranch_7_0/lib/raster/open.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/raster/open.c 2016-02-27 21:20:08 UTC (rev 67969)
+++ grass/branches/releasebranch_7_0/lib/raster/open.c 2016-02-27 22:14:53 UTC (rev 67970)
@@ -29,6 +29,8 @@
#include "R.h"
#define FORMAT_FILE "f_format"
#define NULL_FILE "null"
+/* cmpressed null file */
+#define NULLC_FILE "nullcmpr"
static int new_fileinfo(void)
{
@@ -340,6 +342,11 @@
if (!G_find_file2_misc("cell_misc", NULL_FILE, r_name, r_mapset)) {
/* G_warning("unable to find [%s]",path); */
fcb->null_file_exists = 0;
+ /* check for compressed null file */
+ if (G_find_file2_misc("cell_misc", NULLC_FILE, r_name, r_mapset)) {
+ G_fatal_error(_("Unable to read compressed null file for <%s@%s>"), r_name, r_mapset);
+ return -1;
+ }
}
else {
fcb->null_fd = G_open_old_misc("cell_misc", NULL_FILE, r_name, r_mapset);
More information about the grass-commit
mailing list