Fix reopening after closing file opened by name

This commit is contained in:
alqualos 2011-11-15 16:47:33 +00:00
parent c815a53d9d
commit 15ccedabfd

View file

@ -173,8 +173,10 @@ void QuaZip::close()
return;
}
// opened by name, need to delete the internal IO device
if (!p->zipName.isEmpty())
delete p->ioDevice;
if (!p->zipName.isEmpty()) {
delete p->ioDevice;
p->ioDevice = NULL;
}
if(p->zipError==UNZ_OK)
p->mode=mdNotOpen;
}