From 0d36ac996c7aed9e283cd05314ae2124384df5ea Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 16 Sep 2015 23:43:15 +0100 Subject: Fix exception on adding an empty folder as content (#691). --- src/lib/content_factory.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib') diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index c61889363..5b6d71641 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -77,6 +77,11 @@ content_factory (shared_ptr film, boost::filesystem::path path) shared_ptr content; if (boost::filesystem::is_directory (path)) { + + if (boost::filesystem::is_empty (path)) { + return shared_ptr (); + } + /* Guess if this is a DCP or a set of images: read the first ten filenames and if they are all valid image files we assume it is a set of images. */ -- cgit v1.2.3