[GRASS-SVN] r65441 - grass/trunk/lib/raster
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jun 11 09:02:43 PDT 2015
Author: glynn
Date: 2015-06-11 09:02:43 -0700 (Thu, 11 Jun 2015)
New Revision: 65441
Modified:
grass/trunk/lib/raster/close.c
Log:
Partial revert of r65348
Modified: grass/trunk/lib/raster/close.c
===================================================================
--- grass/trunk/lib/raster/close.c 2015-06-11 15:03:46 UTC (rev 65440)
+++ grass/trunk/lib/raster/close.c 2015-06-11 16:02:43 UTC (rev 65441)
@@ -375,15 +375,15 @@
if (fcb->null_cur_row > 0) {
/* if temporary NULL file exists, write it into cell_misc/name/null */
- if (0 != G_rename_file(fcb->null_temp_name, path)) {
- G_warning(_("Unable to rename file <%s> to <%s>: %s"),
+ if (rename(fcb->null_temp_name, path)) {
+ G_warning(_("Unable to rename null file '%s' to '%s': %s"),
fcb->null_temp_name, path, strerror(errno));
stat = -1;
}
- /* if rename() was successful what is left to remove() ? */
+ /* if rename() was successful what is left to remove() ? */
else {
remove(fcb->null_temp_name);
- }
+ }
}
else {
remove(fcb->null_temp_name);
@@ -450,9 +450,8 @@
if (ok && (fcb->temp_name != NULL)) {
G_file_name(path, CELL_DIR, fcb->name, fcb->mapset);
remove(path);
-
- if (G_rename_file(fcb->temp_name, path)) {
- G_warning(_("Unable to rename file <%s> to <%s>: %s"),
+ if (rename(fcb->temp_name, path)) {
+ G_warning(_("Unable to rename cell file '%s' to '%s': %s"),
fcb->temp_name, path, strerror(errno));
stat = -1;
}
More information about the grass-commit
mailing list