projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't show "file not found" error messages whenever find_canvas() and surefind_canvas...
[synfig.git]
/
synfig-core
/
tags
/
stable
/
src
/
synfig
/
importer.cpp
diff --git
a/synfig-core/tags/stable/src/synfig/importer.cpp
b/synfig-core/tags/stable/src/synfig/importer.cpp
index
524eea3
..
e271110
100644
(file)
--- a/
synfig-core/tags/stable/src/synfig/importer.cpp
+++ b/
synfig-core/tags/stable/src/synfig/importer.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-97,13
+98,14
@@
Importer::open(const String &filename)
return (*__open_importers)[filename];
}
return (*__open_importers)[filename];
}
- if(fi
nd(filename.begin(),filename.end(),'.')==filename.end()
)
+ if(fi
lename_extension(filename) == ""
)
{
synfig::error(_("Importer::open(): Couldn't find extension"));
return 0;
}
{
synfig::error(_("Importer::open(): Couldn't find extension"));
return 0;
}
- String ext=string(filename.begin()+filename.find_last_of('.')+1,filename.end());
+ String ext(filename_extension(filename));
+ if (ext.size()) ext = ext.substr(1); // skip initial '.'
std::transform(ext.begin(),ext.end(),ext.begin(),&::tolower);
std::transform(ext.begin(),ext.end(),ext.begin(),&::tolower);