Переглянути джерело

libraster: sync_and_close() null file

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74459 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 роки тому
батько
коміт
069332e41a
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      lib/raster/close.c

+ 5 - 2
lib/raster/close.c

@@ -395,8 +395,11 @@ static int close_new(int fd, int ok)
 	    Rast__write_null_row_ptrs(fd, fcb->null_fd);
 	}
 
-	if (fcb->null_fd >= 0)
-	    close(fcb->null_fd);
+	if (fcb->null_fd >= 0) {
+	    sync_and_close(fcb->null_fd,
+			   (fcb->null_row_ptr ? NULLC_FILE : NULL_FILE),
+			   fcb->name);
+	}
 	fcb->null_fd = -1;
 
 	/* create path : full null file name */