Skip to content
Snippets Groups Projects
Commit 1b9e724e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Rename has_uri() to has_uri_scheme().

parent 2dab0f97
No related branches found
No related tags found
No related merge requests found
Pipeline #19305 failed
...@@ -88,7 +88,7 @@ cdfComment(int ncid) ...@@ -88,7 +88,7 @@ cdfComment(int ncid)
#endif #endif
static bool static bool
has_uri(const char *uri) has_uri_scheme(const char *uri)
{ {
char *pos = strstr(uri, "://"); char *pos = strstr(uri, "://");
if (pos) if (pos)
...@@ -141,13 +141,13 @@ cdfOpenFile(const char *filename, const char *mode, int *filetype) ...@@ -141,13 +141,13 @@ cdfOpenFile(const char *filename, const char *mode, int *filetype)
if (*filetype == CDI_FILETYPE_NC4) writemode |= NC_NETCDF4; if (*filetype == CDI_FILETYPE_NC4) writemode |= NC_NETCDF4;
if (*filetype == CDI_FILETYPE_NCZARR) writemode |= NC_NETCDF4; if (*filetype == CDI_FILETYPE_NCZARR) writemode |= NC_NETCDF4;
#endif #endif
const bool hasUri = has_uri(filename); const bool hasUriScheme = has_uri_scheme(filename);
if (*filetype == CDI_FILETYPE_NCZARR) if (*filetype == CDI_FILETYPE_NCZARR)
{ {
if (!hasUri) if (!hasUriScheme)
{ {
fprintf(stderr, "URI is missing in NCZarr path!\n"); fprintf(stderr, "URI scheme is missing in NCZarr path!\n");
return CDI_EINVAL; return CDI_EINVAL;
} }
...@@ -155,7 +155,7 @@ cdfOpenFile(const char *filename, const char *mode, int *filetype) ...@@ -155,7 +155,7 @@ cdfOpenFile(const char *filename, const char *mode, int *filetype)
} }
else else
{ {
if (hasUri) fprintf(stderr, "URI defined for non NCZarr Data Model!\n"); if (hasUriScheme) fprintf(stderr, "URI scheme defined for non NCZarr Data Model!\n");
cdf__create(filename, writemode, &ncid); cdf__create(filename, writemode, &ncid);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment