Check return value of symlink().
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Sep 2012 01:28:50 +0000 (02:28 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Sep 2012 01:28:50 +0000 (02:28 +0100)
ChangeLog
src/lib/j2k_still_encoder.cc

index 09d671f29f4e0115943d2281038b8ec3ec38559f..25ba43490350d22defd35c3fa44158a168b0a5ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-18  Carl Hetherington  <cth@carlh.net>
+
+       * Fix non-working removal of encode servers.
+
+       * Add GUI front-end to encode server.
+
 2012-09-17  Carl Hetherington  <cth@carlh.net>
 
        * Include servomatic in the Windows install.
index 5243f066860bcab2d2fa7319b6ce5bdf12f112a9..3109e244ce5e7fc29c44a773381d8e144d9701a6 100644 (file)
@@ -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);