Fix thinko in previous.
[dcpomatic.git] / src / lib / reel_writer.cc
index 064b169b730108d34532e9668c9b11b450f4cbcd..84923c20206a27f84a171b29e1418e29df093681 100644 (file)
@@ -211,7 +211,7 @@ ReelWriter::check_existing_picture_asset ()
 
        try {
                info_file = _film->info_file_handle (_period, true);
-       } catch (OpenFileError) {
+       } catch (OpenFileError &) {
                LOG_GENERAL_NC ("Could not open film info file");
                fclose (asset_file);
                return 0;
@@ -299,10 +299,14 @@ ReelWriter::finish ()
                video_to /= _film->dir (_film->dcp_name());
                video_to /= video_asset_filename (_picture_asset, _reel_index, _reel_count, _content_summary);
 
+               LOG_GENERAL ("Must put %1 into DCP at %2", video_from.string(), video_to.string());
+               LOG_GENERAL ("%1: %2", video_from.string(), boost::filesystem::is_regular_file(video_from) ? "yes" : "no");
+               LOG_GENERAL ("%1: %2", video_to.string(), boost::filesystem::is_regular_file(video_to) ? "yes" : "no");
+
                boost::system::error_code ec;
                boost::filesystem::create_hard_link (video_from, video_to, ec);
                if (ec) {
-                       LOG_WARNING_NC ("Hard-link failed; copying instead");
+                       LOG_WARNING ("Hard-link failed (%1); copying instead", ec.message());
                        shared_ptr<Job> job = _job.lock ();
                        if (job) {
                                job->sub (_("Copying video file into DCP"));
@@ -435,6 +439,8 @@ maybe_add_text (
 shared_ptr<dcp::Reel>
 ReelWriter::create_reel (list<ReferencedReelAsset> const & refs, list<shared_ptr<Font> > const & fonts)
 {
+       LOG_GENERAL ("create_reel for %1-%2; %3 of %4", _period.from.get(), _period.to.get(), _reel_index, _reel_count);
+
        shared_ptr<dcp::Reel> reel (new dcp::Reel ());
 
        shared_ptr<dcp::ReelPictureAsset> reel_picture_asset;