also consider %2E as extension delimiter (e.g. for cached files saved as urlencoded)

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1399 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent fa3a32cf12
commit fc6318504f

@ -564,8 +564,13 @@ int create_unix_socket(const string& path)
string file_extension(const string& path)
{
string::size_type pos = path.rfind('.');
if(pos == string::npos)
return "";
if(pos == string::npos){
pos = path.rfind("%2E");
if(pos == string::npos)
return "";
return path.substr(pos+3,string::npos);
}
return path.substr(pos+1,string::npos);
}

Loading…
Cancel
Save