mirror of https://github.com/akuker/RASCSI.git
Don't resize DiskCache without a file
DiskCache computes its size from a file. Skip ResizeCache Without file (i.e. 'empty' CD) Fixes #1426 Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
This commit is contained in:
parent
b074f7dc9b
commit
0674d6eaf1
|
@ -179,7 +179,11 @@ void SCSICD::ModeSelect(scsi_command cmd, cdb_t cdb, span<const uint8_t> buf, in
|
|||
ClearTrack();
|
||||
CreateDataTrack();
|
||||
FlushCache();
|
||||
ResizeCache(GetFilename(), GetRawMode());
|
||||
string filename;
|
||||
if ((filename = GetFilename()) != "") {
|
||||
// DiskCache fails without a file to compute the cache size
|
||||
ResizeCache(filename, GetRawMode());
|
||||
}
|
||||
}
|
||||
|
||||
if (const string result = scsi_command_util::ModeSelect(cmd, cdb, buf, length, sector_size);
|
||||
|
|
Loading…
Reference in New Issue