diff --git a/src/epilogue/src/ESMF_Test.F90 b/src/epilogue/src/ESMF_Test.F90 index 5fc17b8a5a..faa22d9857 100644 --- a/src/epilogue/src/ESMF_Test.F90 +++ b/src/epilogue/src/ESMF_Test.F90 @@ -799,11 +799,10 @@ subroutine ESMF_TestStart(file, line, unit, rc) ! create a file name for the log file ! find locations of the underscore and period underScore = index (file, "_") - Period = index (file, ".") + Period = index (file, substring=".", back=.true.) ! search from back of string, + ! safe for ./file start logFileName = file(underScore+1:Period) // "Log" - - ! initialize the framework. if this fails, print a message directly ! because there is no guarentee that the log code will be working. call ESMF_Initialize(vm=globalVM, defaultlogfilename=logFileName, &