diff options
Diffstat (limited to 'src/lib/film.cc')
| -rw-r--r-- | src/lib/film.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index c38b59d9e..ac5b43a98 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -686,15 +686,12 @@ Film::content_path () const ContentType Film::content_type () const { -#if BOOST_FILESYSTEM_VERSION == 3 - string ext = boost::filesystem::path(_content).extension().string(); -#else - string ext = boost::filesystem::path(_content).extension(); -#endif + if (boost::filesystem::is_directory (_content)) { + /* Directory of images, we assume */ + return VIDEO; + } - transform (ext.begin(), ext.end(), ext.begin(), ::tolower); - - if (ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png") { + if (still_image_file (_content)) { return STILL; } |
