From b907a0dc7cca2e6037e0493589fe4b8f77d5a18e Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 25 Mar 2012 05:14:58 +0200 Subject: [PATCH] Fix bug #8098 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. --- lib/configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configure.py b/lib/configure.py index f88d51966a..e9c83ee276 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -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, \ -- 2.39.2