Small patches to make backup work and work-around bug #11066
This commit is contained in:
@@ -43,7 +43,10 @@ class Collection:
|
||||
ret = re.split(r"(?<!\\) ", response.message)
|
||||
ret = [re.sub(r"\\ ", " ", x) for x in ret]
|
||||
|
||||
self.uid, self.type, self.flags, self.name = ret
|
||||
if len(ret) < 4:
|
||||
return null
|
||||
self.uid, self.type, self.flags = ret[0:3]
|
||||
self.name = " ".join(ret[3:])
|
||||
|
||||
self.flags = int(self.flags)
|
||||
self.type = int(self.type)
|
||||
|
||||
@@ -596,6 +596,7 @@ class StoreClient:
|
||||
raise CommandError(r)
|
||||
|
||||
def List(self, path, props=[], start=-1, end=-1, flags=None, mask=None):
|
||||
path = path.replace(" ", "\ ")
|
||||
command = "LIST %s" % path
|
||||
|
||||
if start == -1 and end == -1:
|
||||
@@ -719,6 +720,7 @@ class StoreClient:
|
||||
self.connection.Close()
|
||||
|
||||
def Read(self, doc):
|
||||
doc = doc.replace(" ", "\ ")
|
||||
self.stream.Write("READ %s" % (doc))
|
||||
r = self.stream.GetResponse()
|
||||
if r.code != 2001:
|
||||
|
||||
Reference in New Issue
Block a user