Преглед на файлове

windows: workaround for windows "behavior" regarding parsing exec() arguments

Marek Marczykowski-Górecki преди 10 години
родител
ревизия
687e004b1d
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      core-modules/000QubesVm.py

+ 4 - 0
core-modules/000QubesVm.py

@@ -1437,6 +1437,10 @@ class QubesVm(object):
         if os.isatty(sys.stderr.fileno()):
         if os.isatty(sys.stderr.fileno()):
             args += ["-T"]
             args += ["-T"]
         if passio:
         if passio:
+            if os.name == 'nt':
+                # see here for the explanation (_exec doc):
+                #  http://msdn.microsoft.com/en-us/library/431x4c1w.aspx
+                args[0] = '"%"' % args[0]
             os.execv(system_path["qrexec_client_path"], args)
             os.execv(system_path["qrexec_client_path"], args)
             exit(1)
             exit(1)