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

Boot: Fix handling of M3U file paths containing backslashes #11372

Merged
merged 1 commit into from
Dec 29, 2022

Conversation

JosJuice
Copy link
Member

Previously, if a user on Windows launched Dolphin from the command line and specified a path to an M3U file and included backslashes in this path, Dolphin would fail to resolve relative paths in the M3U file.

Thanks to Tartifless on Discord for managing to narrow down the conditions under which the problem happens. I've heard reports every now and then about relative paths not working in M3U files ever since the M3U feature was added, but never managed to reproduce it.

@delroth
Copy link
Member

delroth commented Dec 24, 2022

I'm confused about this fix (which might just mean it needs more documentation): why isn't this fixing SplitPath instead to do the right thing?

@delroth
Copy link
Member

delroth commented Dec 24, 2022

(Or, alternatively, having the m3u code use UnifyPathSeparators or something similar to properly normalize everything to / instead of \)

Previously, if a user on Windows launched Dolphin from the command line
and specified a path to an M3U file and included backslashes in this path,
Dolphin would fail to resolve relative paths in the M3U file.
@JosJuice
Copy link
Member Author

IIRC the current policy in most of Dolphin is to fix up paths to not use backslashes as soon as they "enter" Dolphin, which is why SplitPath doesn't support backslashes. Currently the code that handles launching a game isn't replacing backslashes, but I suppose it would make sense to do so. Commit updated.

Copy link
Member

@delroth delroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, code diff LGTM. Thanks!

@AdmiralCurtiss AdmiralCurtiss merged commit c20bb01 into dolphin-emu:master Dec 29, 2022
@JosJuice JosJuice deleted the m3u-backslash branch December 29, 2022 16:35
Medard22 added a commit to Medard22/Dolphin-MMJR2-VBI that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants