minor fixed

This commit is contained in:
Bernardo Damele 2014-06-30 17:30:20 +01:00
parent c2f14e57e7
commit e2aed41c6f

View File

@ -72,7 +72,7 @@ class Filesystem(GenericFilesystem):
logger.debug("generating chunk file %s\%s from debug script %s" % (tmpPath, chunkName, randScr)) logger.debug("generating chunk file %s\%s from debug script %s" % (tmpPath, chunkName, randScr))
commands = ("cd %s" % tmpPath, "debug < %s" % randScr, "del /F /Q %s" % randScr) commands = ("cd \"%s\"" % tmpPath, "debug < %s" % randScr, "del /F /Q %s" % randScr)
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)
self.execCmd(complComm) self.execCmd(complComm)
@ -183,7 +183,7 @@ class Filesystem(GenericFilesystem):
logger.debug("converting the file utilizing PowerShell EncodedCommand") logger.debug("converting the file utilizing PowerShell EncodedCommand")
commands = ("cd %s" % tmpPath, commands = ("cd \"%s\"" % tmpPath,
"powershell -EncodedCommand %s" % psString, "powershell -EncodedCommand %s" % psString,
"del /F /Q %s" % randFilePath) "del /F /Q %s" % randFilePath)
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)
@ -233,14 +233,14 @@ class Filesystem(GenericFilesystem):
debugMsg += "%s\%s to %s file %s\%s" % (tmpPath, chunkName, fileType, tmpPath, dFileName) debugMsg += "%s\%s to %s file %s\%s" % (tmpPath, chunkName, fileType, tmpPath, dFileName)
logger.debug(debugMsg) logger.debug(debugMsg)
commands = ("cd %s" % tmpPath, copyCmd, "del /F %s" % chunkName) commands = ("cd \"%s\"" % tmpPath, copyCmd, "del /F %s" % chunkName)
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)
self.execCmd(complComm) self.execCmd(complComm)
logger.debug("moving %s file %s to %s" % (fileType, sFile, dFile)) logger.debug("moving %s file %s to %s" % (fileType, sFile, dFile))
commands = ("cd %s" % tmpPath, "move /Y %s %s" % (dFileName, dFile)) commands = ("cd \"%s\"" % tmpPath, "move /Y %s %s" % (dFileName, dFile))
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)
self.execCmd(complComm) self.execCmd(complComm)
@ -319,7 +319,7 @@ class Filesystem(GenericFilesystem):
self.xpCmdshellWriteFile(vbs, tmpPath, randVbs) self.xpCmdshellWriteFile(vbs, tmpPath, randVbs)
commands = ("cd %s" % tmpPath, "cscript //nologo %s" % randVbs, commands = ("cd \"%s\"" % tmpPath, "cscript //nologo %s" % randVbs,
"del /F /Q %s" % randVbs, "del /F /Q %s" % randVbs,
"del /F /Q %s" % randFile) "del /F /Q %s" % randFile)
complComm = " & ".join(command for command in commands) complComm = " & ".join(command for command in commands)