diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 9 | ||||
| -rw-r--r-- | src/lib/film.h | 2 | ||||
| -rw-r--r-- | src/lib/writer.cc | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index dd31388b6..56dce56e5 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -509,10 +509,11 @@ Film::read_metadata (optional<boost::filesystem::path> path) } /** Given a directory name, return its full path within the Film's directory. - * The directory (and its parents) will be created if they do not exist. + * @param d directory name within the Filn's directory. + * @param create true to create the directory (and its parents) if they do not exist. */ boost::filesystem::path -Film::dir (boost::filesystem::path d) const +Film::dir (boost::filesystem::path d, bool create) const { DCPOMATIC_ASSERT (_directory); @@ -520,7 +521,9 @@ Film::dir (boost::filesystem::path d) const p /= _directory.get(); p /= d; - boost::filesystem::create_directories (p); + if (create) { + boost::filesystem::create_directories (p); + } return p; } diff --git a/src/lib/film.h b/src/lib/film.h index 2b700b007..1d8af39d8 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -89,7 +89,7 @@ public: } boost::filesystem::path file (boost::filesystem::path f) const; - boost::filesystem::path dir (boost::filesystem::path d) const; + boost::filesystem::path dir (boost::filesystem::path d, bool create = true) const; void use_template (std::string name); std::list<std::string> read_metadata (boost::optional<boost::filesystem::path> path = boost::optional<boost::filesystem::path> ()); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index ccd6d74d1..595915883 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -79,9 +79,6 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j) , _repeat_written (0) , _pushed_to_disk (0) { - /* Remove any old DCP */ - boost::filesystem::remove_all (_film->dir (_film->dcp_name ())); - shared_ptr<Job> job = _job.lock (); DCPOMATIC_ASSERT (job); |
