From f731a6550754ed4c2dbcdad42e3c2cecac8807fd 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. (cherry picked from commit b907a0dc7cca2e6037e0493589fe4b8f77d5a18e) --- lib/configure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configure.py b/lib/configure.py index 767a7a9ab8..cfeab936a2 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.5