Fix dcpomatic_create with no output directory specified.
authorCarl Hetherington <cth@carlh.net>
Mon, 10 Apr 2017 08:27:36 +0000 (09:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 10 Apr 2017 08:27:36 +0000 (09:27 +0100)
src/tools/dcpomatic_create.cc

index 0582f5cac0d5701ac2912faccf675355ecd9ff84..0a7a48a73551d017be26a29459a34125fabf08cb 100644 (file)
@@ -98,7 +98,7 @@ main (int argc, char* argv[])
        Ratio const * content_ratio = 0;
        int still_length = 10;
        dcp::Standard standard = dcp::SMPTE;
-       boost::filesystem::path output;
+       optional<boost::filesystem::path> output;
        bool sign = true;
        bool use_isdcf_name = true;
 
@@ -263,7 +263,7 @@ main (int argc, char* argv[])
                        exit (EXIT_FAILURE);
                }
 
-               if (!output.empty ()) {
+               if (output) {
                        film->write_metadata ();
                } else {
                        film->metadata()->write_to_stream_formatted (cout, "UTF-8");