Skip to content

Reading @ with GDAL is broken on Windows #3657

@joa-quim

Description

@joa-quim
grdinfo @warning.png
ERROR 4: `c:c:/j/.gmt/cache//j/.gmt/cache/warning.png' does not exist in the file system, and is not recognized as a supported dataset name.
grdinfo (gmtapi_import_grid): Not a supported grid format [c:/j/.gmt/cache/warning.png]

The problem is in

GMT_LOCAL GDALDatasetH gdal_open (struct GMT_CTRL *GMT, char *gdal_filename) {
	char *file = NULL, path[PATH_MAX] = {""}, *c = NULL;
	if (gmtlib_found_url_for_gdal (gdal_filename))	/* A vis*** URL, pass to GDAL as is */
		strncpy (path, gdal_filename, PATH_MAX-1);
	else if ((c = strchr(gdal_filename, ':'))) {		/* Assume it is a SUBDATASET */

: is not a SUBDATASET separator it's the c:

I knew that test was not good to have. So we still need a 6.1.1 soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions