Merge master.
[dcpomatic.git] / src / lib / util.cc
index c09ed9cb24bb5dbdcb1f9c4c26d4e31b853022c6..344a9f97d00d49f539adfcda688799f34322335e 100644 (file)
@@ -387,7 +387,7 @@ mo_path ()
 boost::filesystem::path
 mo_path ()
 {
-       return "DCP-o-matic.app/Contents/Resources";
+       return "DCP-o-matic 2.app/Contents/Resources";
 }
 #endif
 
@@ -472,7 +472,10 @@ md5_digest (vector<boost::filesystem::path> files, shared_ptr<Job> job)
 
                while (remaining > 0) {
                        int const t = min (remaining, buffer_size);
-                       fread (buffer, 1, t, f);
+                       int const r = fread (buffer, 1, t, f);
+                       if (r != t) {
+                               throw ReadFileError (files[i], errno);
+                       }
                        digester.add (buffer, t);
                        remaining -= t;