Skip to content

Update settings.py line 819#6263

Open
jordansds wants to merge 1 commit into
ArchipelagoMW:mainfrom
jordansds:patch-1
Open

Update settings.py line 819#6263
jordansds wants to merge 1 commit into
ArchipelagoMW:mainfrom
jordansds:patch-1

Conversation

@jordansds

@jordansds jordansds commented Jun 14, 2026

Copy link
Copy Markdown

What is this fixing or adding?

Replace "\" with "/" when reading the host.yaml. Because many users just copy paths containing "\" then complain when it doesn't work.

How was this tested?

Loaded host.yaml containing the following example paths for functionality:
"\\mnt\\disk1\\SteamLibrary\\steamapps\\common\\Total War WARHAMMER III"
"\mnt\disk1\SteamLibrary\steamapps\common\Total War WARHAMMER III"
"/mnt/disk1/SteamLibrary/steamapps/common/Total War WARHAMMER III"
All 3 do not throw errors and work identically.

Replace "\" with "/" when reading the host.yaml. Because many users just copy paths containing "\" then complain when it doesn't work.
@github-actions github-actions Bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jun 14, 2026
@duckboycool

Copy link
Copy Markdown
Collaborator

This change is not safe. Backslashes may very well be used inside the host.yaml either for escapes or simply things other than paths where they should not be changed to forward slashes. Even if we could do this perfectly, I don't think that we should be accepting invalid yaml syntax and thus working with a pseudo-yaml format.

Also are you sure that this issue is caused by people copying paths? I'm pretty sure I've seen people run into this who don't even know what the host.yaml is, and in fact copying Windows paths would work so long as you don't add the extra quotes around it (depending on if the copy itself does that). I think this is happening for some people when added by a file dialog, but I'm not sure how.

@jordansds

jordansds commented Jun 14, 2026

Copy link
Copy Markdown
Author

I wrote copying, but I don't know whether it's copying or the file dialog causing this. I didn't see how the dialog could be the problem so assumed it was user's copying a path incorrectly.
I didn't think there was a use case for escape characters within the host.yaml, but to keep in line with yaml syntax then I can understand not implementing this, I assumed there would be some reason why an obvious solution had not been implemented yet.

Would it make sense to apply a simple .replace to the browse function of the FolderPath class instead? If the file dialog is causing this issue, that should catch the issue before writing to the host.yaml? Although, I suppose some madmen could have "\" in their directory names...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants