Merged from trunk

This commit is contained in:
gholt 2010-12-10 09:41:08 -08:00
commit d464757d71
2 changed files with 5 additions and 3 deletions

5
bin/st
View File

@ -1065,8 +1065,9 @@ def st_download(options, args, print_queue, error_queue):
if path[:1] in ('/', '\\'):
path = path[1:]
md5sum = None
make_dir = out_file != "-"
if content_type.split(';', 1)[0] == 'text/directory':
if not isdir(path):
if make_dir and not isdir(path):
mkdirs(path)
read_length = 0
if 'x-object-manifest' not in headers:
@ -1077,7 +1078,7 @@ def st_download(options, args, print_queue, error_queue):
md5sum.update(chunk)
else:
dirpath = dirname(path)
if dirpath and not isdir(dirpath):
if make_dir and dirpath and not isdir(dirpath):
mkdirs(dirpath)
if out_file == "-":
fp = stdout

View File

@ -494,7 +494,8 @@ class ObjectReplicator(Daemon):
self.object_ring.get_part_nodes(int(partition))
if node['id'] != local_dev['id']]
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))
except ValueError:
continue