From 957a36cd0fa7ab8d6203de84543154954d3e43c5 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi Date: Sun, 15 Aug 2021 16:16:26 +0200 Subject: [PATCH] Revert "Report an error if a file has no end-of-line but it should" This reverts commit 44c00a9d7fd8d6869b36babd24b11dc6ffd96e14. See #727 --- regtest/tools/rt-make-grid/input-grid.data | 1 + src/tools/IFile.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/regtest/tools/rt-make-grid/input-grid.data b/regtest/tools/rt-make-grid/input-grid.data index 310327402a..4c8c997075 100644 --- a/regtest/tools/rt-make-grid/input-grid.data +++ b/regtest/tools/rt-make-grid/input-grid.data @@ -9,3 +9,4 @@ 1.2300 0.0521 1.4068 1.2600 0.1120 2.6873 1.2900 0.2199 4.6183 + 1.3200 0.3948 7.1055 \ No newline at end of file diff --git a/src/tools/IFile.cpp b/src/tools/IFile.cpp index 6a8f53de60..bff649f967 100644 --- a/src/tools/IFile.cpp +++ b/src/tools/IFile.cpp @@ -237,7 +237,6 @@ IFile& IFile::getline(std::string &str) { if(eof && noEOL) { if(str.length()>0) eof=false; } else if(eof || err || tmp!='\n') { - if(str.length()>0) plumed_merror("file " + getPath() + " is not allowed to have a non-terminated line. Please add a newline at the end of the file"); eof = true; str=""; if(!err) fsetpos(fp,&pos);