diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-08-22 15:43:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-08-22 15:43:05 +0100 |
| commit | ed1a6b0bf1a2c781a22640fd8a0c44a79f063bae (patch) | |
| tree | f76ef327a602fb36aec2e5210a5df51005bc5411 | |
| parent | 012ad9a456d1c87d0916f448e3183ba3bb2e85cd (diff) | |
Fix write_frame_info again.
| -rw-r--r-- | src/lib/writer.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 190304300..053c18451 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -294,7 +294,12 @@ Writer::have_sequenced_image_at_queue_head () void Writer::write_frame_info (int frame, Eyes eyes, dcp::FrameInfo info) const { - FILE* file = fopen_boost (_film->info_file(), "r+b"); + FILE* file = 0; + if (boost::filesystem::exists (_film->info_file ())) { + file = fopen_boost (_film->info_file(), "r+b"); + } else { + file = fopen_boost (_film->info_file(), "wb"); + } if (!file) { throw OpenFileError (_film->info_file ()); } |
