X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftypes.cc;h=228ebf28f6d47bc442e12d8b4f43540c66ae1189;hb=67ff55886b1ee86d99c2ea27d10c73b85b0504b7;hp=3586cdb935b67bc065a55a99592611967eb13706;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/lib/types.cc b/src/lib/types.cc index 3586cdb93..228ebf28f 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -214,13 +214,15 @@ CPLSummary::CPLSummary (boost::filesystem::path p) encrypted = false; for (auto j: dcp.cpls()) { for (auto k: j->reel_file_assets()) { - if (k->key_id()) { + if (k->encrypted()) { encrypted = true; } } } - 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; }