Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b269e84

Browse files
committed
Fixes #1608
1 parent dc7f2a7 commit b269e84

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ def posixToNtSlashes(filepath):
17381738
'C:\\\\Windows'
17391739
"""
17401740

1741-
return filepath.replace('/', '\\')
1741+
return filepath.replace('/', '\\') if filepath else filepath
17421742

17431743
def ntToPosixSlashes(filepath):
17441744
"""
@@ -1749,7 +1749,7 @@ def ntToPosixSlashes(filepath):
17491749
'C:/Windows'
17501750
"""
17511751

1752-
return filepath.replace('\\', '/')
1752+
return filepath.replace('\\', '/') if filepath else filepath
17531753

17541754
def isHexEncodedString(subject):
17551755
"""

plugins/dbms/mysql/takeover.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def udfSetRemotePath(self):
6060
else:
6161
self.__plugindir = "%s/lib/mysql/plugin" % self.__basedir
6262

63-
self.__plugindir = ntToPosixSlashes(normalizePath(self.__plugindir))
63+
self.__plugindir = ntToPosixSlashes(normalizePath(self.__plugindir)) or '.'
6464

6565
self.udfRemoteFile = "%s/%s.%s" % (self.__plugindir, self.udfSharedLibName, self.udfSharedLibExt)
6666

@@ -74,7 +74,7 @@ def udfSetRemotePath(self):
7474

7575
# NOTE: specifying the relative path as './udf.dll'
7676
# saves in @@datadir on both MySQL 4.1 and MySQL 5.0
77-
self.__datadir = "."
77+
self.__datadir = '.'
7878
self.__datadir = ntToPosixSlashes(normalizePath(self.__datadir))
7979

8080
# The DLL can be in either C:\WINDOWS, C:\WINDOWS\system,

0 commit comments

Comments
 (0)