diff --git a/tapeserver/castor/tape/tapeserver/file/File.cpp b/tapeserver/castor/tape/tapeserver/file/File.cpp index 855a94e162a9c2d27f24235b99f011be009264af..16d21ee9dafb397dd65f10569f2bae9b1c1ec969 100644 --- a/tapeserver/castor/tape/tapeserver/file/File.cpp +++ b/tapeserver/castor/tape/tapeserver/file/File.cpp @@ -219,8 +219,8 @@ namespace castor { throw cta::exception::InvalidArgument(err.str()); } - int64_t fSeq_delta = fileToRecall.selectedTapeFile().fSeq - - m_session->getCurrentFseq(); + const int64_t fSeq_delta = (int64_t)fileToRecall.selectedTapeFile().fSeq + - (int64_t)m_session->getCurrentFseq(); if(fileToRecall.selectedTapeFile().fSeq == 1) { // special case: we can rewind the tape to be faster //(TODO: in the future we could also think of a threshold above