ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.16k stars 160 forks source link

Basic games plugin breaks depending on install path #1486

Open LostDragonist opened 3 years ago

LostDragonist commented 3 years ago

MO 2.4.1

Having MO2 installed in the path "C:\[XYZ]" breaks the basic_games plugin to the point where none of the game plugins will load or show up in the plugins menu. This is a very specific bug for some reason. "C:\XYZ]" works fine, "C:\[XYZ" works fine, and "C:\{XYZ}" works fine. It's only square brackets that cause the issue.

Log from "C:\[XYZ]": mo_interface.log

Log from "C:\{XYZ}": mo_interface.log

isanae commented 3 years ago

The python plugins generally fail with paths containing characters other than alphanumeric.

Holt59 commented 3 years ago

https://stackoverflow.com/questions/2595119/python-glob-and-bracket-characters

isanae commented 3 years ago

I've seen failures with non-ASCII characters, it's not just globbing.

LostDragonist commented 3 years ago

This seems to be specifically the globbing issue as all the other python plugins are loading. /shrug.

LostDragonist commented 3 years ago

And "[XYZ]" is all ASCII ;)

Holt59 commented 3 years ago

I've seen failures with non-ASCII characters, it's not just globbing.

I'm not saying this is the only problem with other Python plugins but in this case it's likely the one since [ and ] are special characters for glob patterns and it is easily solvable with glob.escape.