Fix Linux-only mkdir.
authorCarl Hetherington <cth@carlh.net>
Fri, 30 Nov 2018 13:57:03 +0000 (13:57 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 30 Nov 2018 13:57:03 +0000 (13:57 +0000)
src/tools/dcpomatic_ecinema.cc

index 6a19e5c42724f3f9ca9a62d0c844ecb96939168b..64874cbefd0fef88982c954f74a32154966dac30 100644 (file)
@@ -90,9 +90,8 @@ main (int argc, char* argv[])
        boost::filesystem::path input = argv[optind];
        boost::filesystem::path output_mp4 = *output / (input.filename().string() + ".ecinema");
 
-       if (mkdir(output->c_str(), 0777) < 0) {
-               cerr << "Could not create output directory `" << output->string() << "'\n";
-               exit (EXIT_FAILURE);
+       if (!boost::filesystem::is_directory(*output)) {
+               boost::filesystem::create_directory (*output);
        }
 
        av_register_all ();