X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffile_group.cc;h=3e8a7b79c43177a8d775889ab91d08855bb0e77e;hb=36e81aebf03d00c716b5e603deb0b5f8f6a99f53;hp=e18b9824e27181543ab271546ac6853d985f90a9;hpb=7c3f9fd51051330c8fc58c298b907222d734fa31;p=dcpomatic.git diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index e18b9824e..3e8a7b79c 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -93,7 +93,7 @@ FileGroup::ensure_open_path (size_t p) const _current_path = p; _current_file = fopen_boost (_paths[_current_path], "rb"); if (_current_file == 0) { - throw OpenFileError (_paths[_current_path], errno, true); + throw OpenFileError (_paths[_current_path], errno, OpenFileError::READ); } } @@ -162,7 +162,7 @@ FileGroup::read (uint8_t* buffer, int amount) const break; } - if (ferror(_current_file) && errno != EAGAIN) { + if (ferror(_current_file)) { throw FileError (String::compose("fread error %1", errno), _paths[_current_path]); }