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:
parent
3e37460357
commit
b6e1f1c0ad
1 changed files with 2 additions and 1 deletions
|
|
@ -88,7 +88,8 @@ bool TalkFileCreator::createTalkFiles()
|
||||||
//! \returns the modified string
|
//! \returns the modified string
|
||||||
QString TalkFileCreator::stripExtension(QString filename)
|
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("."));
|
return filename.left(filename.lastIndexOf("."));
|
||||||
else
|
else
|
||||||
return filename;
|
return filename;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue