Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit edeb4b6

Browse files
committed
bug fix for --os-shell on Windows (echo ... > requires double quotes if the piped filename contains whitespace, otherwise doesn't hurt)
1 parent 35fa214 commit edeb4b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/takeover/xp_cmdshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def xpCmdshellEvalCmd(self, cmd, first=None, last=None):
114114
self.getRemoteTempPath()
115115

116116
tmpFile = "%s/tmpc%s.txt" % (conf.tmpPath, randomStr(lowercase=True))
117-
cmd = "%s > %s" % (cmd, tmpFile)
117+
cmd = "%s > \"%s\"" % (cmd, tmpFile)
118118

119119
self.xpCmdshellExecCmd(cmd)
120120

0 commit comments

Comments
 (0)