Assorted C++11/formatting cleanups.
[dcpomatic.git] / src / lib / types.cc
index 3586cdb935b67bc065a55a99592611967eb13706..b7632a9842a07afb6315b63ca64aef0699893f3d 100644 (file)
@@ -220,7 +220,9 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
                }
        }
 
-       last_write_time = boost::filesystem::last_write_time (p);
+       boost::system::error_code ec;
+       auto last_write = boost::filesystem::last_write_time (p, ec);
+       last_write_time = ec ? 0 : last_write;
 }