[GRASS-SVN] r52455 - grass/branches/develbranch_6/db/drivers/dbf

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 26 18:03:34 PDT 2012


Author: hamish
Date: 2012-07-26 18:03:33 -0700 (Thu, 26 Jul 2012)
New Revision: 52455

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

Modified: grass/branches/develbranch_6/db/drivers/dbf/db.c
===================================================================
--- grass/branches/develbranch_6/db/drivers/dbf/db.c	2012-07-26 23:39:43 UTC (rev 52454)
+++ grass/branches/develbranch_6/db/drivers/dbf/db.c	2012-07-27 01:03:33 UTC (rev 52455)
@@ -93,6 +93,16 @@
 		report_error();
 		return DB_FAILED;
 	    }
+	    else {
+		/* now that the dbf/ dir is created, try again */
+		dir = opendir(db.name);
+		if (dir == NULL) {
+		    append_error("Cannot open dbf database directory: %s\n",
+				 name);
+		    report_error();
+		    return DB_FAILED;
+		}
+	    }
 	}
 	else {			/* some other problem */
 	    append_error("Cannot open dbf database: %s\n", name);



More information about the grass-commit mailing list