tape locate_file: fix off by one error

This commit is contained in:
Dietmar Maurer 2021-05-11 12:37:04 +02:00
parent 37ff72720b
commit 1bff50afea

View File

@ -300,6 +300,8 @@ impl SgTape {
return self.rewind(); return self.rewind();
} }
let position = position -1;
let mut sg_raw = SgRaw::new(&mut self.file, 16)?; let mut sg_raw = SgRaw::new(&mut self.file, 16)?;
sg_raw.set_timeout(Self::SCSI_TAPE_DEFAULT_TIMEOUT); sg_raw.set_timeout(Self::SCSI_TAPE_DEFAULT_TIMEOUT);
let mut cmd = Vec::new(); let mut cmd = Vec::new();