1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dominik Wenger 2010-04-27 21:09:14 +00:00
parent 3e37460357
commit b6e1f1c0ad

View file

@ -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;