fix setCWD on mirror lock/unlock
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1575 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+17
-3
@@ -5597,7 +5597,7 @@ class FtpInterface:
|
||||
self.ftpdir = self.ftpdir.split(":")[0]
|
||||
if self.ftpdir.endswith("/"):
|
||||
self.ftpdir = self.ftpdir[:len(self.ftpdir)-1]
|
||||
if self.ftpdir == "":
|
||||
if not self.ftpdir:
|
||||
self.ftpdir = "/"
|
||||
|
||||
count = 10
|
||||
@@ -5627,6 +5627,10 @@ class FtpInterface:
|
||||
self.ftpconn.cwd(self.ftpdir)
|
||||
self.currentdir = self.ftpdir
|
||||
|
||||
def setBasedir(self):
|
||||
rc = self.setCWD(self.ftpdir)
|
||||
return rc
|
||||
|
||||
# this can be used in case of exceptions
|
||||
def reconnectHost(self):
|
||||
# import FTP modules
|
||||
@@ -12195,8 +12199,13 @@ class ServerMirrorsInterface:
|
||||
|
||||
if not ftp_connection:
|
||||
ftp_connection = self.FtpInterface(uri, self.Entropy)
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
else:
|
||||
mycwd = ftp_connection.getCWD()
|
||||
if mycwd != etpConst['etpurirelativepath']:
|
||||
ftp_connection.setBasedir()
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
crippled_uri = self.entropyTools.extractFTPHostFromUri(uri)
|
||||
lock_string = ''
|
||||
if dblock:
|
||||
@@ -12231,8 +12240,13 @@ class ServerMirrorsInterface:
|
||||
|
||||
if not ftp_connection:
|
||||
ftp_connection = self.FtpInterface(uri, self.Entropy)
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
else:
|
||||
mycwd = ftp_connection.getCWD()
|
||||
if mycwd != etpConst['etpurirelativepath']:
|
||||
ftp_connection.setBasedir()
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
|
||||
ftp_connection.setCWD(etpConst['etpurirelativepath'])
|
||||
crippled_uri = self.entropyTools.extractFTPHostFromUri(uri)
|
||||
|
||||
if dblock:
|
||||
|
||||
Reference in New Issue
Block a user