More fr_FR tweaks from Lilian.
[dcpomatic.git] / src / lib / writer.cc
index 06acaa1f63109162c53521a55c513396f2096e39..2d7ee9ba317f32d1246142064b09890bb25cadb5 100644 (file)
@@ -273,8 +273,14 @@ Writer::finish ()
        boost::filesystem::path to;
        to /= _film->dir (_film->dcp_name());
        to /= N_("video.mxf");
-       
-       boost::filesystem::create_hard_link (from, to);
+
+       boost::system::error_code ec;
+       boost::filesystem::create_hard_link (from, to, ec);
+       if (ec) {
+               /* hard link failed; copy instead */
+               boost::filesystem::copy_file (from, to);
+               _film->log()->log ("Hard-link failed; fell back to copying");
+       }
 
        /* And update the asset */