diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-15 00:41:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-05-11 21:00:37 +0200 |
| commit | d2c665cba983c625933817e0bf05e298f80f0119 (patch) | |
| tree | c631beb6a9f56b76df71285559a042809d47851e /src/tools/dcpomatic.cc | |
| parent | 59195cd423442f1c2b6c1d97162c1f5ecfe1f609 (diff) | |
Stop using video directory and hard-linking (#2756).
Instead store details of a previously-created asset in the film's
metadata and then look there for potential video files to re-use.
Diffstat (limited to 'src/tools/dcpomatic.cc')
| -rw-r--r-- | src/tools/dcpomatic.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 8f65fa83d..63802279f 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -102,6 +102,7 @@ #include <dcp/exceptions.h> #include <dcp/filesystem.h> #include <dcp/raw_convert.h> +#include <dcp/scope_guard.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/cmdline.h> @@ -816,15 +817,9 @@ private: { double required; double available; - bool can_hard_link; - if (!_film->should_be_enough_disk_space (required, available, can_hard_link)) { - wxString message; - if (can_hard_link) { - message = wxString::Format (_("The DCP for this film will take up about %.1f GB, and the disk that you are using only has %.1f GB available. Do you want to continue anyway?"), required, available); - } else { - message = wxString::Format (_("The DCP and intermediate files for this film will take up about %.1f GB, and the disk that you are using only has %.1f GB available. You would need half as much space if the filesystem supported hard links, but it does not. Do you want to continue anyway?"), required, available); - } + if (!_film->should_be_enough_disk_space(required, available)) { + auto const message = wxString::Format(_("The DCP for this film will take up about %.1f GB, and the disk that you are using only has %.1f GB available. Do you want to continue anyway?"), required, available); if (!confirm_dialog (this, message)) { return; } @@ -854,6 +849,8 @@ private: if (!confirm_dialog (this, wxString::Format (_("Do you want to overwrite the existing DCP %s?"), std_to_wx(dcp_dir.string()).data()))) { return; } + + preserve_assets(dcp_dir, _film->assets_path()); dcp::filesystem::remove_all(dcp_dir); } |
