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: Remove redundant statement #10482

Merged

Conversation

Dentomologist
Copy link
Contributor

There are several problems with this statement:

  • It tries to return [Directory containing Dolphin]/Dolphin.app/Contents/MacOS instead of the [Directory containing Dolphin]/Dolphin.app that is assumed by callers of the function.
  • It uses std::string's find_last_of function, which returns the last instance of any character in the string rather than the last occurrence of the string as a whole.
  • The haystack string is initialized with GetBundleDirectory() which returns [Directory containing Dolphin]/Dolphin.app, which would make the search fail if it were actually using a function that found the last instance of the string.

These errors coincidentally cancel each other out, but better to just remove the statement.

@leoetlino leoetlino merged commit bcc14d3 into dolphin-emu:master Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants