summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/talkfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/talkfile.cpp')
-rw-r--r--rbutil/rbutilqt/base/talkfile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/talkfile.cpp b/rbutil/rbutilqt/base/talkfile.cpp
index 0cc8872351..3813912347 100644
--- a/rbutil/rbutilqt/base/talkfile.cpp
+++ b/rbutil/rbutilqt/base/talkfile.cpp
@@ -88,7 +88,8 @@ bool TalkFileCreator::createTalkFiles()
//! \returns the modified string
QString TalkFileCreator::stripExtension(QString filename)
{
- if(filename.lastIndexOf(".") != -1)
+ // only strip extension if there is a dot in the filename and there are chars before the dot
+ if(filename.lastIndexOf(".") != -1 && filename.left(filename.lastIndexOf(".")) != "")
return filename.left(filename.lastIndexOf("."));
else
return filename;