projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bde54c
)
Try to copy instead of hard linking if the hard-link fails (#77).
author
Carl Hetherington
<cth@carlh.net>
Tue, 12 Mar 2013 22:15:36 +0000
(22:15 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 12 Mar 2013 22:15:36 +0000
(22:15 +0000)
src/lib/writer.cc
patch
|
blob
|
history
diff --git
a/src/lib/writer.cc
b/src/lib/writer.cc
index 06acaa1f63109162c53521a55c513396f2096e39..6ca56ec4e743e7c175111e778c3916e4ff98b5ac 100644
(file)
--- a/
src/lib/writer.cc
+++ b/
src/lib/writer.cc
@@
-273,8
+273,12
@@
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;
+ if (boost::filesystem::create_hard_link (from, to, ec)) {
+ /* hard link failed; copy instead */
+ boost::filesystem::copy_file (from, to);
+ }
/* And update the asset */