Try to fix problems with upper-case still-image extensions.
authorCarl Hetherington <cth@carlh.net>
Thu, 27 Sep 2012 09:29:38 +0000 (10:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 27 Sep 2012 09:29:38 +0000 (10:29 +0100)
src/lib/film_state.cc

index 739eeac3c7a89dc9a1b05f55c870ff11ce33254f..e472434ce97442373117b38da39f8119924242dc 100644 (file)
@@ -251,10 +251,13 @@ ContentType
 FilmState::content_type () const
 {
 #if BOOST_FILESYSTEM_VERSION == 3
-       string const ext = filesystem::path(content).extension().string();
+       string ext = filesystem::path(content).extension().string();
 #else
-       string const ext = filesystem::path(content).extension();
+       string ext = filesystem::path(content).extension();
 #endif
+
+       transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
+       
        if (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png") {
                return STILL;
        }