mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-19 02:36:27 +01:00

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.