Skip to content

Commit 95998e3

Browse files
committed
Implementing undocumented way how to retrieve w+ temporary directory name on MsSQL (suggested by Vlado Velichkovski)
1 parent 742c66f commit 95998e3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

plugins/generic/misc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
See the file 'doc/COPYING' for copying permission
66
"""
77

8+
import ntpath
89
import re
910

1011
from lib.core.common import Backend
@@ -36,6 +37,11 @@ def __init__(self):
3637
pass
3738

3839
def getRemoteTempPath(self):
40+
if not conf.tmpPath and Backend.isDbms(DBMS.MSSQL):
41+
_ = unArrayizeValue(inject.getValue("SELECT SERVERPROPERTY('ErrorLogFileName')", safeCharEncode=False))
42+
if _:
43+
conf.tmpPath = ntpath.dirname(_)
44+
3945
if not conf.tmpPath:
4046
if Backend.isOs(OS.WINDOWS):
4147
if conf.direct:

0 commit comments

Comments
 (0)