diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-04-29 23:07:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-04-29 23:07:27 +0100 |
| commit | 3155b285e8260329a835de8c057f4a4cc9a5dcbd (patch) | |
| tree | 0e1660e219936466f6880e7b9c1140d14800f662 /src/tools/dcpomatic.cc | |
| parent | a85c82137ec26124ebefccb4aeebb96a3cdb8a4c (diff) | |
Hand-apply 0faa096dd8e3f8a5ba3975a88aaf6d1994866604 from master; improve disk space check wrt hard links.
Diffstat (limited to 'src/tools/dcpomatic.cc')
| -rw-r--r-- | src/tools/dcpomatic.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 3151b5e11..221044afa 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -402,9 +402,16 @@ private: { double required; double available; + bool can_hard_link; - if (!_film->should_be_enough_disk_space (required, available)) { - if (!confirm_dialog (this, 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 (!_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 (!confirm_dialog (this, message)) { return; } } |
