diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2010-04-27 21:09:14 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2010-04-27 21:09:14 +0000 |
commit | b6e1f1c0ad3153c2193cb3ba04857d5a5bced296 (patch) | |
tree | ec54383ceccedb97cef82a3accfdb2d5d7493e21 /rbutil/rbutilqt | |
parent | 3e37460357cc446931cab7cbf7fbc844d183db0a (diff) |
Fix talkfile generation for files starting with . and having no extension.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25742 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/base/talkfile.cpp | 3 |
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; |