Merged from trunk
This commit is contained in:
5
bin/st
5
bin/st
@@ -1065,8 +1065,9 @@ def st_download(options, args, print_queue, error_queue):
|
|||||||
if path[:1] in ('/', '\\'):
|
if path[:1] in ('/', '\\'):
|
||||||
path = path[1:]
|
path = path[1:]
|
||||||
md5sum = None
|
md5sum = None
|
||||||
|
make_dir = out_file != "-"
|
||||||
if content_type.split(';', 1)[0] == 'text/directory':
|
if content_type.split(';', 1)[0] == 'text/directory':
|
||||||
if not isdir(path):
|
if make_dir and not isdir(path):
|
||||||
mkdirs(path)
|
mkdirs(path)
|
||||||
read_length = 0
|
read_length = 0
|
||||||
if 'x-object-manifest' not in headers:
|
if 'x-object-manifest' not in headers:
|
||||||
@@ -1077,7 +1078,7 @@ def st_download(options, args, print_queue, error_queue):
|
|||||||
md5sum.update(chunk)
|
md5sum.update(chunk)
|
||||||
else:
|
else:
|
||||||
dirpath = dirname(path)
|
dirpath = dirname(path)
|
||||||
if dirpath and not isdir(dirpath):
|
if make_dir and dirpath and not isdir(dirpath):
|
||||||
mkdirs(dirpath)
|
mkdirs(dirpath)
|
||||||
if out_file == "-":
|
if out_file == "-":
|
||||||
fp = stdout
|
fp = stdout
|
||||||
|
@@ -494,7 +494,8 @@ class ObjectReplicator(Daemon):
|
|||||||
self.object_ring.get_part_nodes(int(partition))
|
self.object_ring.get_part_nodes(int(partition))
|
||||||
if node['id'] != local_dev['id']]
|
if node['id'] != local_dev['id']]
|
||||||
jobs.append(dict(path=join(obj_path, partition),
|
jobs.append(dict(path=join(obj_path, partition),
|
||||||
nodes=nodes, delete=len(nodes) > 2,
|
nodes=nodes,
|
||||||
|
delete=len(nodes) > self.object_ring.replica_count - 1,
|
||||||
partition=partition))
|
partition=partition))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user