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 064c3f0ec08db18da764b54a1b218c8f6759c598..5e8f8fc9fd1935476a1a8f7238b3b4b14acf5be8 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)) {