input/csv: Match format on .csv extension in filename.
This commit is contained in:
parent
cb41a838a7
commit
b866fc095d
|
@ -134,6 +134,10 @@ struct context {
|
||||||
|
|
||||||
static int format_match(const char *filename)
|
static int format_match(const char *filename)
|
||||||
{
|
{
|
||||||
|
/* Require .csv extension. */
|
||||||
|
if (strcmp(filename + strlen(filename) - 4, ".csv"))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
sr_err("%s: filename was NULL.", __func__);
|
sr_err("%s: filename was NULL.", __func__);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue