[GRASS-SVN] r50464 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 26 05:25:30 EST 2012


Author: hamish
Date: 2012-01-26 02:25:30 -0800 (Thu, 26 Jan 2012)
New Revision: 50464

Modified:
   grass/branches/develbranch_6/lib/gis/closecell.c
Log:
print an errno message to help with #1276

Modified: grass/branches/develbranch_6/lib/gis/closecell.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/closecell.c	2012-01-26 07:58:53 UTC (rev 50463)
+++ grass/branches/develbranch_6/lib/gis/closecell.c	2012-01-26 10:25:30 UTC (rev 50464)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <signal.h>
 #include <grass/gis.h>
@@ -306,8 +307,10 @@
 	G_debug(5, "Moving temporary cell map into main mapset...");
 	G__file_name(path, CELL_DIR, fcb->name, fcb->mapset);
 
-	if (remove(path) != 0)
+	if (remove(path) != 0) {
+	    perror(path);
 	    G_warning(_("Unable to delete the prior 'cell' file"));
+	}
 
 	if (rename(fcb->temp_name, path)) {
 	    G_warning(_("closecell: can't move [%s] to cell file [%s]"),



More information about the grass-commit mailing list