]> git.lyx.org Git - features.git/commitdiff
Fix bug #8098
authorEnrico Forestieri <forenr@lyx.org>
Sun, 25 Mar 2012 03:14:58 +0000 (05:14 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 25 Mar 2012 13:36:51 +0000 (15:36 +0200)
The Windows shell cannot have a UNC path as the current directory.
However, using pushd to change to the same directory automatically
maps the UNC path to a drive letter and thus it works.

Note that when calling cmd.exe from a UNC path there are still
warnings about the UNC path, but the command is then successfully
executed because the current directory is set to something digestible
by the shell.
(cherry picked from commit b907a0dc7cca2e6037e0493589fe4b8f77d5a18e)

lib/configure.py

index 767a7a9ab85a84883f03b20c2c622ad915c10145..cfeab936a265d9139b4fb4f9b18c23bbd3c3a29a 100644 (file)
@@ -62,7 +62,7 @@ def cmdOutput(cmd):
     '''
     if os.name == 'nt':
         b = False
-        cmd = 'cmd /d /c ' + cmd
+        cmd = 'cmd /d /c pushd ' + os.getcwd() + '&' + cmd
     else:
         b = True
     pipe = subprocess.Popen(cmd, shell=b, close_fds=b, stdin=subprocess.PIPE, \