[GRASS-user] Database driver problem

Markus Neteler neteler at osgeo.org
Mon Oct 5 03:24:29 EDT 2009


On Thu, Oct 1, 2009 at 7:31 PM, Glynn Clements <glynn at gclements.plus.com> wrote:
>
> Markus Neteler wrote:
>
>> > I've tried importing the spearfish_contours files via File-->Import Vector
>> > Map-->Multiple Formats Using OGR and get this message
>> >
>> > Invalid argument: can't _spawnl
>> > Unable to start driver <sqlite>
>
>> Could the problem be that \ and / slashes are used?
>
> Quite possibly. Try this:
>
> --- lib/db/dbmi_base/dbmscap.c  (revision 39364)
> +++ lib/db/dbmi_base/dbmscap.c  (working copy)
> @@ -175,6 +175,7 @@
>        dirpath = G_malloc(strlen("\"\\driver\\db\\\"")
>                           + strlen(G_gisbase()) + strlen(ent->d_name) + 1);
>        sprintf(dirpath, "\"%s\\driver\\db\\%s\"", G_gisbase(), ent->d_name);
> +       G_convert_dirseps_to_host(dirpath);
>  #else
>        G_asprintf(&dirpath, "\"%s/driver/db/%s\"", G_gisbase(), ent->d_name);
>  #endif

Is this a harmless change? then I would submit it... otherwise it
will take years to figure this out unless someone actually compiles
and *tests* on Windows...
Submitting it would get it at least into the next test compilation.

Markus


More information about the grass-user mailing list