mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Io: Don't confuse kernel object with meta handle.
Make sure we never try to close an unrelated open file when destroying an async open temporary file node.
This commit is contained in:
parent
294f78dec9
commit
9324a1c20b
1 changed files with 4 additions and 3 deletions
|
@ -1506,10 +1506,10 @@ static FileNode *__IoOpen(int &error, const char *filename, int flags, int mode)
|
|||
error = 0;
|
||||
|
||||
FileNode *f = new FileNode();
|
||||
SceUID id = kernelObjects.Create(f);
|
||||
kernelObjects.Create(f);
|
||||
f->handle = h;
|
||||
f->fullpath = filename;
|
||||
f->asyncResult = id;
|
||||
f->asyncResult = h;
|
||||
f->info = info;
|
||||
f->openMode = access;
|
||||
f->isTTY = isTTY;
|
||||
|
@ -2118,7 +2118,8 @@ static u32 sceIoOpenAsync(const char *filename, int flags, int mode) {
|
|||
return hleLogError(SCEIO, error, "device not found");
|
||||
|
||||
f = new FileNode();
|
||||
f->handle = kernelObjects.Create(f);
|
||||
kernelObjects.Create(f);
|
||||
f->handle = -1;
|
||||
f->fullpath = filename;
|
||||
f->closePending = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue