diff options
| -rw-r--r-- | project2/fileRows.cpp | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/project2/fileRows.cpp b/project2/fileRows.cpp index 7251a9f..600ab7c 100644 --- a/project2/fileRows.cpp +++ b/project2/fileRows.cpp @@ -2,6 +2,7 @@  #include "rowProcessor.h"  #include "xmlObjectLoader.h"  #include "exceptions.h" +#include <boost/algorithm/string/predicate.hpp>  ElementLoaderImpl<FileRows> filerowsLoader("filerows"); @@ -59,7 +60,9 @@ FileRows::execute(const RowProcessor * rp) const  	c.set_line_term(newline);  	Glib::ustring line;  	while (c.read_line(line) == Glib::IO_STATUS_NORMAL) { -		line.erase(line.length() - newline.length()); +		if (boost::algorithm::ends_with(line, newline)) { +			line.erase(line.length() - newline.length()); +		}  		Columns::const_iterator curCol = columns.begin();  		bool mkCols = columns.empty();  		bool inQuotes = false;  | 
