Fix misidentification of dot in path name
[alexxy/gromacs.git] / src / gromacs / commandline / pargs.cpp
index 8b7a459d8f3561038cbd1b4bf6f250c2922bb5b3..48c540e5a3f89bec7692fe499a987e5f7b1e6f4d 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/path.h"
 #include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/stringutil.h"
@@ -334,7 +335,7 @@ void OptionsAdapter::filenmToOptions(Options *options, t_filenm *fnm)
     {
         defName = ftp2defnm(fnm->ftp);
     }
-    else if (std::strchr(defName, '.') != NULL)
+    else if (Path::hasExtension(defName))
     {
         defType = fn2ftp(defName);
         GMX_RELEASE_ASSERT(defType != efNR,