From 45cb9e3ba4101412f47bc1c3842d1d9d0c7c04f6 Mon Sep 17 00:00:00 2001 From: kiakanpa Date: Sat, 13 Aug 2016 15:15:21 +0100 Subject: [PATCH] Allow streaming of roms with space in filename fix to wrap rom path in triple quotes to allow for steam in-home streaming to stream rom files with spaces in path/filename --- ice/emulators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ice/emulators.py b/ice/emulators.py index c173200..a8dd000 100644 --- a/ice/emulators.py +++ b/ice/emulators.py @@ -11,6 +11,7 @@ def emulator_rom_launch_command(emulator, rom): # so normalizing it then adding quotes should do what I want 100% of the time normalize = lambda s: s.strip("\"") add_quotes = lambda s: "\"%s\"" % s + add_rom_quotes = lambda s: "\"\"\"%s\"\"\"" % s # We don't know if the user put quotes around the emulator location. If # so, we dont want to add another pair and screw things up. @@ -18,7 +19,7 @@ def emulator_rom_launch_command(emulator, rom): # The user didnt give us the ROM information, but screw it, I already # have some code to add quotes to a string, might as well use it. quoted_location = add_quotes(normalize(emulator.location)) - quoted_rom = add_quotes(normalize(rom.path)) + quoted_rom = add_rom_quotes(normalize(rom.path)) # The format string contains a bunch of specifies that users can use to # substitute values in at runtime. Right now the only supported values are: # %l - The location of the emulator (to avoid sync bugs)