diff --git a/src/XrdPfc/XrdPfc.cc b/src/XrdPfc/XrdPfc.cc index 95af7561ea6..6ab7e934f99 100644 --- a/src/XrdPfc/XrdPfc.cc +++ b/src/XrdPfc/XrdPfc.cc @@ -459,7 +459,7 @@ File* Cache::GetFile(const std::string& path, IO* io, long long off, long long f File *file = 0; - if (filesize > 0) + if (filesize >= 0) { file = File::FileOpen(path, off, filesize); } diff --git a/src/XrdPfc/XrdPfcFile.cc b/src/XrdPfc/XrdPfcFile.cc index 2ac2bfeaeb3..6b2675e464d 100644 --- a/src/XrdPfc/XrdPfcFile.cc +++ b/src/XrdPfc/XrdPfcFile.cc @@ -1177,19 +1177,10 @@ void File::ProcessBlockResponse(BlockResponseHandler* brh, int res) if (res >= 0 && res != b->get_size()) { - // XXXX pgRead sets res to 4k-rounded result for the last block XXXX - if (b->m_offset + b->get_size() == m_file_size && res == b->get_req_size()) - { - TRACEF(Info, tpfx << "Assuming pgRead last-block roundof bug"); - res = b->get_size(); - } - else - { // Incorrect number of bytes received, apparently size of the file on the remote // is different than what the cache expects it to be. TRACEF(Error, tpfx << "Wrong number of bytes received, assuming remote/local file size mismatch, unlinking local files and initiating shutdown of File object"); Cache::GetInstance().UnlinkFile(m_filename, false); - } } XrdSysCondVarHelper _lck(m_state_cond);