Fix crash when finding DCP size with Interop subs.
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Jun 2017 12:54:43 +0000 (13:54 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Jun 2017 12:54:43 +0000 (13:54 +0100)
src/lib/writer.cc

index 064c3f0..5e8f8fc 100644 (file)
@@ -563,7 +563,9 @@ Writer::write_cover_sheet ()
                boost::filesystem::recursive_directory_iterator i = boost::filesystem::recursive_directory_iterator(_film->dir(_film->dcp_name()));
                i != boost::filesystem::recursive_directory_iterator();
                ++i) {
-               size += boost::filesystem::file_size (i->path ());
+               if (boost::filesystem::is_regular_file (i->path ())) {
+                       size += boost::filesystem::file_size (i->path ());
+               }
        }
 
        if (size > (1000000000L)) {