file: Convert file to a memfile as soon as possible
This commit is contained in:
parent
8906518cd2
commit
a1bcf3c09b
@ -106,6 +106,10 @@ void *freadall(struct file_handle *fd, uint32_t type) {
|
||||
} else {
|
||||
void *ret = ext_mem_alloc_type(fd->size, type);
|
||||
fd->read(fd, ret, 0, fd->size);
|
||||
fd->close(fd);
|
||||
fd->is_memfile = true;
|
||||
fd->readall = true;
|
||||
fd->fd = ret;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user