simons-public / protonfixes

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files
https://simons-public.github.io/protonfixes/
Other
232 stars 117 forks source link

Improve handling for all ManiaPlanet Titles #138

Closed cverstege closed 3 years ago

cverstege commented 3 years ago

The previous scripts did not work because of a bug in line 32. It should've been os.remove(game_path) instead of os.remove(game_id). Instead of simply fixing the bug I decided to add some features:

cverstege commented 3 years ago

The failing build should not be from my commits, but is caused by some previous commit on master.

simons-public commented 3 years ago

Thanks!

cverstege commented 3 years ago

@simons-public Do you have any Idea why the copying fails for file paths when they contain special characters? Since it's running on Python3, it should all be unicode and should work. out of the box. But many local records have time@track in their filenames and are therefore not copied (because of the @)

simons-public commented 3 years ago

@Citiroller Not sure, haven't run into that problem before since Python3 is unicode like you said. I don't know the folder structure since I don't have any of the games affected, but you might try using shutil.move to move the whole directory contents instead of iterating through each file with os.walk.

cverstege commented 3 years ago

@simons-public the thing is shutil.move overwrites existing files in the destination directory. And I'm not sure if this is the right way, as there might be more recent files inside the common prefix. But I think it might be better as there should be less data loss in total. Should I change it and test it again?