Commit 84ab3e89 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix making default file name with lower case type

modified:
  storage/connect/mycat.cc
parent 4aef6a69
......@@ -344,9 +344,21 @@ char *MYCAT::GetStringCatInfo(PGLOBAL g, PSZ what, PSZ sdef)
strcpy(sval, s);
} else if (!stricmp(what, "filename")) {
// Return default file name
sval= (char*)PlugSubAlloc(g, NULL, strlen(Hc->GetTableName()) + 8);
char *ftype= Hc->GetStringOption("Type", "dos");
int i, n;
sval= (char*)PlugSubAlloc(g, NULL, strlen(Hc->GetTableName()) + 12);
strcat(strcpy(sval, Hc->GetTableName()), ".");
strcat(sval, Hc->GetStringOption("Type", "DOS"));
n= strlen(sval);
// Fold ftype to lower case
for (i= 0; i < 12; i++)
if (!ftype[i]) {
sval[n+i]= 0;
break;
} else
sval[n+i]= tolower(ftype[i]);
} else
sval = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment