This commit is contained in:
Miroslav Stampar 2015-12-15 10:46:37 +01:00
parent dc7f2a71d2
commit b269e8418f
2 changed files with 4 additions and 4 deletions

View File

@ -1738,7 +1738,7 @@ def posixToNtSlashes(filepath):
'C:\\\\Windows' 'C:\\\\Windows'
""" """
return filepath.replace('/', '\\') return filepath.replace('/', '\\') if filepath else filepath
def ntToPosixSlashes(filepath): def ntToPosixSlashes(filepath):
""" """
@ -1749,7 +1749,7 @@ def ntToPosixSlashes(filepath):
'C:/Windows' 'C:/Windows'
""" """
return filepath.replace('\\', '/') return filepath.replace('\\', '/') if filepath else filepath
def isHexEncodedString(subject): def isHexEncodedString(subject):
""" """

View File

@ -60,7 +60,7 @@ class Takeover(GenericTakeover):
else: else:
self.__plugindir = "%s/lib/mysql/plugin" % self.__basedir self.__plugindir = "%s/lib/mysql/plugin" % self.__basedir
self.__plugindir = ntToPosixSlashes(normalizePath(self.__plugindir)) self.__plugindir = ntToPosixSlashes(normalizePath(self.__plugindir)) or '.'
self.udfRemoteFile = "%s/%s.%s" % (self.__plugindir, self.udfSharedLibName, self.udfSharedLibExt) self.udfRemoteFile = "%s/%s.%s" % (self.__plugindir, self.udfSharedLibName, self.udfSharedLibExt)
@ -74,7 +74,7 @@ class Takeover(GenericTakeover):
# NOTE: specifying the relative path as './udf.dll' # NOTE: specifying the relative path as './udf.dll'
# saves in @@datadir on both MySQL 4.1 and MySQL 5.0 # saves in @@datadir on both MySQL 4.1 and MySQL 5.0
self.__datadir = "." self.__datadir = '.'
self.__datadir = ntToPosixSlashes(normalizePath(self.__datadir)) self.__datadir = ntToPosixSlashes(normalizePath(self.__datadir))
# The DLL can be in either C:\WINDOWS, C:\WINDOWS\system, # The DLL can be in either C:\WINDOWS, C:\WINDOWS\system,