[GRASS-SVN] r46027 - grass/branches/develbranch_6/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 18 07:37:56 EDT 2011
Author: marisn
Date: 2011-04-18 04:37:56 -0700 (Mon, 18 Apr 2011)
New Revision: 46027
Modified:
grass/branches/develbranch_6/lib/vector/Vlib/map.c
Log:
Add extra debuging info to help track down #1303
Modified: grass/branches/develbranch_6/lib/vector/Vlib/map.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/map.c 2011-04-18 10:45:20 UTC (rev 46026)
+++ grass/branches/develbranch_6/lib/vector/Vlib/map.c 2011-04-18 11:37:56 UTC (rev 46027)
@@ -23,6 +23,7 @@
#include <dirent.h>
#include <string.h>
#include <unistd.h>
+#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -522,7 +523,7 @@
G_debug(3, "delete file '%s'", buf);
ret = unlink(buf);
if (ret == -1) {
- G_warning(_("Unable to delete file '%s'"), buf);
+ G_warning(_("Unable to delete file '%s'. Reason: %s"), buf, strerror(errno));
closedir(dir);
return -1;
}
@@ -539,7 +540,7 @@
ret = rename(buf, tmp);
if (ret == -1) {
- G_warning(_("Unable to rename directory '%s' to '%s'"), buf, tmp);
+ G_warning(_("Unable to rename directory '%s' to '%s'. Reason: %s"), buf, tmp, strerror(errno));
return -1;
}
@@ -547,7 +548,7 @@
/* Warning: remove() fails on Windows */
ret = rmdir(tmp);
if (ret == -1) {
- G_warning(_("Unable to remove directory '%s'"), tmp);
+ G_warning(_("Unable to remove directory '%s'. Reason: %s"), tmp, strerror(errno));
return -1;
}
More information about the grass-commit
mailing list