[GRASS-SVN] r65273 - grass/trunk/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 18 13:03:37 PDT 2015
Author: glynn
Date: 2015-05-18 13:03:37 -0700 (Mon, 18 May 2015)
New Revision: 65273
Modified:
grass/trunk/lib/raster/open.c
Log:
Prioritise uncompressed null file over compressed null file (issue #2349)
Modified: grass/trunk/lib/raster/open.c
===================================================================
--- grass/trunk/lib/raster/open.c 2015-05-18 19:41:18 UTC (rev 65272)
+++ grass/trunk/lib/raster/open.c 2015-05-18 20:03:37 UTC (rev 65273)
@@ -338,18 +338,19 @@
}
else {
/* First, check for compressed null file */
- fcb->null_fd = G_open_old_misc("cell_misc", NULL2_FILE, r_name, r_mapset);
- if (fcb->null_fd >= 0) {
- fcb->null_row_ptr = G_calloc(fcb->cellhd.rows + 1, sizeof(off_t));
- if (Rast__read_null_row_ptrs(fd, fcb->null_fd) < 0) {
- close(fcb->null_fd);
- fcb->null_fd = -1;
- G_free(fcb->null_row_ptr);
- fcb->null_row_ptr = NULL;
+ fcb->null_fd = G_open_old_misc("cell_misc", NULL_FILE, r_name, r_mapset);
+ if (fcb->null_fd < 0) {
+ fcb->null_fd = G_open_old_misc("cell_misc", NULL2_FILE, r_name, r_mapset);
+ if (fcb->null_fd >= 0) {
+ fcb->null_row_ptr = G_calloc(fcb->cellhd.rows + 1, sizeof(off_t));
+ if (Rast__read_null_row_ptrs(fd, fcb->null_fd) < 0) {
+ close(fcb->null_fd);
+ fcb->null_fd = -1;
+ G_free(fcb->null_row_ptr);
+ fcb->null_row_ptr = NULL;
+ }
}
}
- if (fcb->null_fd < 0)
- fcb->null_fd = G_open_old_misc("cell_misc", NULL_FILE, r_name, r_mapset);
fcb->null_file_exists = fcb->null_fd >= 0;
}
}
More information about the grass-commit
mailing list