JonnyHaystack / i3-resurrect

Simple solution to saving and restoring i3 workspaces
GNU General Public License v3.0
369 stars 18 forks source link

Improve handling of processes with single argument #70

Closed JonnyHaystack closed 4 years ago

JonnyHaystack commented 4 years ago

Previously I would do shlex.split(cmdline[0]) if the cmdline had only one argument. This would break single argument processes with spaces in the executable path.

Now I check both that the cmdline has one argument and that that argument is an executable (using shutil.which()).

This means now it will only fail for relative executable paths with spaces in them, which should be very uncommon.