extend "can_read" function. returns true, if no explicit filename is given, but just the extension.
closes #2431 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1260 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -93,12 +93,12 @@ can_u_write(const std::string& _filename) const
|
||||
std::string::size_type pos(_filename.rfind("."));
|
||||
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
extension = _filename.substr(pos+1, _filename.length()-pos-1);
|
||||
else
|
||||
extension = _filename; //check, if the whole filename defines the extension
|
||||
|
||||
std::transform( extension.begin(), extension.end(),
|
||||
extension.begin(), tolower );
|
||||
}
|
||||
std::transform( extension.begin(), extension.end(),
|
||||
extension.begin(), tolower );
|
||||
|
||||
// locate extension in extension string
|
||||
return (get_extensions().find(extension) != std::string::npos);
|
||||
|
||||
Reference in New Issue
Block a user