Minor bug fix, %TEMP% is expanded only in xp_cmdshell (MSSQL), so disabled for MySQL/PGSQL

This commit is contained in:
Bernardo Damele 2010-05-13 10:40:15 +00:00
parent 091e0b2e05
commit 762781e94d

View File

@ -49,23 +49,10 @@ class Miscellaneous:
def getRemoteTempPath(self): def getRemoteTempPath(self):
if not conf.tmpPath: if not conf.tmpPath:
if kb.os == "Windows": if kb.os == "Windows":
# NOTES: if kb.dbms == "Microsoft SQL Server":
#
# * The system-wide temporary files directory is
# C:\WINDOWS\Temp
#
# * MySQL runs by default as SYSTEM
#
# * PostgreSQL runs by default as postgres user and the
# temporary files directory is C:\Documents and Settings\postgres\Local Settings\Temp,
# however the system-wide folder is writable too
#
#infoMsg = "retrieving remote absolute path of temporary files "
#infoMsg += "directory"
#logger.info(infoMsg)
#
#conf.tmpPath = self.evalCmd("echo %TEMP%")
conf.tmpPath = "%TEMP%" conf.tmpPath = "%TEMP%"
else:
conf.tmpPath = "C:/WINDOWS/Temp"
else: else:
conf.tmpPath = "/tmp" conf.tmpPath = "/tmp"