Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUtil: Don't try to retrieve size for FIFO pipe #12200

Merged
merged 1 commit into from Sep 28, 2023

Conversation

itsmattkc
Copy link
Contributor

This is an extremely small patch that fixes an exception thrown if you try to use POSIX pipes as control inputs (as detailed in this wiki article).

On the current master, if you have a POSIX pipe in Dolphin's "Pipes" folder, it will crash on startup with the following message:

terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: cannot get file size: Operation not supported [<filename>]

This happens because ScanDirectoryTree attempts to get the size of all non-directories, which as the exception explains is not valid for FIFO pipes.

This patch adds an additional check for is_fifo() in addition to the existing check for is_directory(), returning 0 for the size in both cases.

@AdmiralCurtiss AdmiralCurtiss merged commit a7c5f2f into dolphin-emu:master Sep 28, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants