diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-29 13:49:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-29 13:49:54 +0100 |
| commit | 391d85619ac19a2a93696ddc35c222eb9bb5d9d6 (patch) | |
| tree | fd551f1dda4c97076cbc29465e97e3ad3fdef5e1 /src/lib | |
| parent | 41e0dcde8ea8ec93e14778d09db3d9604b8fada7 (diff) | |
| parent | 8b842865451795d5e8f8b39691c210de1ed5dd4f (diff) | |
Merge master.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/writer.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index a023d5cd2..6262525c8 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -52,6 +52,7 @@ #define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); #define LOG_TIMING(...) _film->log()->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); #define LOG_WARNING_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_WARNING); +#define LOG_ERROR(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_ERROR); /* OS X strikes again */ #undef set_key @@ -406,9 +407,12 @@ Writer::finish () boost::system::error_code ec; boost::filesystem::create_hard_link (video_from, video_to, ec); if (ec) { - /* hard link failed; copy instead */ - boost::filesystem::copy_file (video_from, video_to); - LOG_WARNING_NC ("Hard-link failed; fell back to copying"); + LOG_WARNING_NC ("Hard-link failed; copying instead"); + boost::filesystem::copy_file (video_from, video_to, ec); + if (ec) { + LOG_ERROR ("Failed to copy video file from %1 to %2 (%3)", video_from.string(), video_to.string(), ec.message ()); + throw FileError (ec.message(), video_from); + } } _picture_mxf->set_file (video_to); |
