Skip to content

Commit

Permalink
Merge pull request #14 from openfedem/gui-issue-35
Browse files Browse the repository at this point in the history
Fix issue openfedem/fedem-gui#35: Accept CSV as ASCII-file extension
  • Loading branch information
kmokstad authored Oct 19, 2024
2 parents f77f824 + 4d987cf commit 8be1a12
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/FiDeviceFunctions/FiDeviceFunctionFactory.C
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,17 @@ FiDevFormat FiDeviceFunctionFactory::identify(const std::string& fileName,
}
}

if (ending == "DAC")
format = DAC_FILE;
else if (ending == "ASC" || ending == "TXT")
if (ending == "ASC" || ending == "CSV" || ending == "TXT")
{
if (status == IO_READ && FiASCFile::isMultiChannel(fd,fullName.c_str()))
format = ASC_MC_FILE;
else
format = ASC_FILE;
}
else if (ending == "TIM" || ending == "DRV" || ending == "RSP")
format = RPC_TH_FILE;
else if (ending == "DAC")
format = DAC_FILE;

if (fd) FT_close(fd);
return format;
Expand Down

0 comments on commit 8be1a12

Please sign in to comment.