[GRASS-SVN] r52456 - grass/trunk/db/drivers/dbf

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 26 18:17:24 PDT 2012


Author: hamish
Date: 2012-07-26 18:17:23 -0700 (Thu, 26 Jul 2012)
New Revision: 52456

Modified:
   grass/trunk/db/drivers/dbf/db.c
Log:
fix #1690: when dbf/ dir was missing it was making it, but continuing with dir still as (null), merge from devbr6

Modified: grass/trunk/db/drivers/dbf/db.c
===================================================================
--- grass/trunk/db/drivers/dbf/db.c	2012-07-27 01:03:33 UTC (rev 52455)
+++ grass/trunk/db/drivers/dbf/db.c	2012-07-27 01:17:23 UTC (rev 52456)
@@ -94,6 +94,16 @@
 		db_d_report_error();
 		return DB_FAILED;
 	    }
+	    else {
+		/* now that the dbf/ dir is created, try again */
+		dir = opendir(db.name);
+		if (dir == NULL) {
+		    db_d_append_error(_("Cannot open DBF database directory: %s"),
+					name);
+		    db_d_report_error();
+		    return DB_FAILED;
+		}
+	    }
 	}
 	else {			/* some other problem */
 	    db_d_append_error(_("Unable to open DBF database: %s"), name);



More information about the grass-commit mailing list