def getRemoteTempPath(self): if not conf.tmpPath: if kb.os == "Windows": # NOTES: # # * 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 = "C:/WINDOWS/Temp" else: conf.tmpPath = "/tmp" if re.search("\A[\w]:[\/\\\\]+", conf.tmpPath, re.I): kb.os = "Windows" conf.tmpPath = ntToPosixSlashes(conf.tmpPath) conf.tmpPath = normalizePath(conf.tmpPath) setRemoteTempPath()
def getRemoteTempPath(self): if not conf.tmpPath: if kb.os == "Windows": conf.tmpPath = "C:/WINDOWS/Temp" else: conf.tmpPath = "/tmp" if getCompiledRegex("(?i)\A[\w]:[\/\\\\]+").search(conf.tmpPath): kb.os = "Windows" conf.tmpPath = normalizePath(conf.tmpPath) conf.tmpPath = ntToPosixSlashes(conf.tmpPath) setRemoteTempPath()
def getRemoteTempPath(self): if not conf.tmpPath: if Backend.isOs(OS.WINDOWS): conf.tmpPath = "C:/WINDOWS/Temp" else: conf.tmpPath = "/tmp" if getCompiledRegex("(?i)\A[\w]:[\/\\\\]+").search(conf.tmpPath): Backend.setOs(OS.WINDOWS) conf.tmpPath = normalizePath(conf.tmpPath) conf.tmpPath = ntToPosixSlashes(conf.tmpPath) setRemoteTempPath()