From 447b63f1e0b456ce4b7417b5f294cd7691bfa099 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 6 Jun 2014 15:20:44 -0500 Subject: [PATCH] Strip trailing whitespace in clean filenames. --- src/FileData.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FileData.cpp b/src/FileData.cpp index bfb508084..a1b625d8a 100644 --- a/src/FileData.cpp +++ b/src/FileData.cpp @@ -32,6 +32,13 @@ std::string removeParenthesis(const std::string& str) } } + // also strip whitespace + end = ret.find_last_not_of(' '); + if(end != std::string::npos) + end++; + + ret = ret.substr(0, end); + return ret; }