summaryrefslogtreecommitdiff
path: root/src/lib/content_factory.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-09-16 23:43:15 +0100
committerCarl Hetherington <cth@carlh.net>2015-09-16 23:43:15 +0100
commit0d36ac996c7aed9e283cd05314ae2124384df5ea (patch)
treed3f437be303e3f0025cbb4b923126eec487a6f35 /src/lib/content_factory.cc
parentcc471c30e8aee47f7ef704c2ace995b0fce3e872 (diff)
Fix exception on adding an empty folder as content (#691).
Diffstat (limited to 'src/lib/content_factory.cc')
-rw-r--r--src/lib/content_factory.cc5
1 files changed, 5 insertions, 0 deletions
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<const Film> film, boost::filesystem::path path)
shared_ptr<Content> content;
if (boost::filesystem::is_directory (path)) {
+
+ if (boost::filesystem::is_empty (path)) {
+ return shared_ptr<Content> ();
+ }
+
/* 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.
*/