From 8127ec3671ce9e294654c402c2414dfa8348a81f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Sep 2012 02:28:50 +0100 Subject: Check return value of symlink(). --- src/lib/j2k_still_encoder.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/j2k_still_encoder.cc b/src/lib/j2k_still_encoder.cc index 5243f0668..3109e244c 100644 --- a/src/lib/j2k_still_encoder.cc +++ b/src/lib/j2k_still_encoder.cc @@ -67,7 +67,10 @@ J2KStillEncoder::process_video (shared_ptr yuv, int frame) if (!boost::filesystem::exists (_opt->frame_out_path (i, false))) { string const link = _opt->frame_out_path (i, false); #ifdef DVDOMATIC_POSIX - symlink (real.c_str(), link.c_str()); + int const r = symlink (real.c_str(), link.c_str()); + if (r) { + throw EncodeError ("could not create symlink"); + } #endif #ifdef DVDOMATIC_WINDOWS filesystem::copy_file (real, link); -- cgit v1.2.3