Change flExtension() to return the empty string if there is no extension.
This should fix #15909, thanks to raorn for investigating.
This commit is contained in:
parent
c2a7ba45e0
commit
f2922999ae
@ -169,14 +169,14 @@ string flNotFile(string File)
|
||||
return string(File,0,Res);
|
||||
}
|
||||
/*}}}*/
|
||||
// flExtension - Return the extension for the file /*{{{*/
|
||||
// flExtension - Return the extension for the file or "" if none /*{{{*/
|
||||
// ---------------------------------------------------------------------
|
||||
/* */
|
||||
string flExtension(string File)
|
||||
{
|
||||
string::size_type Res = File.rfind('.');
|
||||
if (Res == string::npos)
|
||||
return File;
|
||||
return string();
|
||||
Res++;
|
||||
return string(File,Res,Res - File.length());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user