yancharkin / games_nebula

Unofficial Linux client for GOG.
GNU General Public License v3.0
158 stars 11 forks source link

Problems with spaces in paths #23

Closed sgsaenger closed 6 years ago

sgsaenger commented 6 years ago

In various files, the path-strings are passed unescaped or unwrapped to the shell. This breaks e.g. paths like /data/GOG Games/.

yancharkin commented 6 years ago

Thanks for the report, I'll look into it.

sgsaenger commented 6 years ago

Just poked around a bit, seems like you're using os.system for executing shell commands. I guess this should be changed to using subprocess.call, where you don't have to construct the whole line as a string, but can supply the arguments as arguments from within python. At least in a simple test this seems to take care of most problems I could think of.

yancharkin commented 6 years ago

There wasn't any particular reasons to use os.system and not subprocess.call, I just used first thing that came to my mind. So probably you are right and subprocess.call should be used instead of os.system. If you have time, you can make required changes and send PR. If not I'll fix this issue in a few days.

yancharkin commented 6 years ago

@sgsaenger I see you forked the repo. I fixed the issue in games_nebula.py, so if you're planning to work on this issue you can skip this file.

yancharkin commented 6 years ago

@sgsaenger The issue should be fixed now. You can test and report the result.

sgsaenger commented 6 years ago

Seems fixed, indeed! Could move the library and launch games, at least.

yancharkin commented 6 years ago

Closing this issue for now. Report here if you'll encounter similar problems.