mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-16 02:59:11 +01:00
391644dbb5
This changes FileSystemProxy::Open to return a file descriptor wrapper that will ensure the FD is closed when it goes out of scope. By using such a wrapper we make it more difficult to forget to close file descriptors. This fixes a leak in ReadBootContent. I should have added such a class from the beginning... In practice, I don't think this would have caused any obvious issue because ReadBootContent is only called after an IOS relaunch -- which clears all FDs -- and most titles do not get close to the FD limit.