diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-09-29 23:28:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-09-29 23:28:57 +0200 |
| commit | ab0e8cdcafdcb83096012380f674b8280474e851 (patch) | |
| tree | b89df2d9abcbf15e1a113db8ea3024aadc41edaa /src/lib/util.cc | |
| parent | 9a6d5d07edef459e6e7ac1708f32c34981d6cd05 (diff) | |
Improve OpenFileError so that it doesn't say "opening for read"v2.15.20
in one case where it should say "opening for read/write".
Also add some unit tests for ReelWriter.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index fee4a3c26..2dedc32c1 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -473,7 +473,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size) while (i < int64_t (files.size()) && to_do > 0) { FILE* f = fopen_boost (files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, true); + throw OpenFileError (files[i].string(), errno, OpenFileError::READ); } boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); @@ -493,7 +493,7 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size) while (i >= 0 && to_do > 0) { FILE* f = fopen_boost (files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, true); + throw OpenFileError (files[i].string(), errno, OpenFileError::READ); } boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i])); |
