diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-18 02:28:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-18 02:28:50 +0100 |
| commit | 8127ec3671ce9e294654c402c2414dfa8348a81f (patch) | |
| tree | 8dbfad628f4e1338a6d0993826f5ecca72240220 /src/lib | |
| parent | b589fc45d307b78fd68a8d3a816a656d1dcd41cd (diff) | |
Check return value of symlink().
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/j2k_still_encoder.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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<Image> 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); |
