Fix crash on windows.
[dcpomatic.git] / src / lib / reel_writer.cc
index d742818ae08849bfe81e191c3f922deb01a3b6c0..784eed1efb295d800dd84d6d092f3f1e9da80292 100644 (file)
@@ -130,7 +130,20 @@ ReelWriter::write_frame_info (Frame frame, Eyes eyes, dcp::FrameInfo info) const
 {
        FILE* file = 0;
        boost::filesystem::path info_file = _film->info_file (_period);
+
        bool const read = boost::filesystem::exists (info_file);
+
+#ifdef DCPOMATIC_WINDOWS
+       if (read) {
+               LOG_GENERAL (
+                       "Checked %1 (which exists) length is %2 perms are %3",
+                       info_file, boost::filesystem::file_size (info_file), int(boost::filesystem::status(info_file).permissions())
+                       );
+       } else {
+               LOG_GENERAL ("Checked %1 (which does not exist)", info_file);
+       }
+#endif
+
        if (read) {
                file = fopen_boost (info_file, "r+b");
        } else {