Stop loss of precision when writing 'x-object-meta-mtime'

str(float) isn't a good way of converting a float to a string with all the precision

Eg

    >>> f = os.path.getmtime("z")
    >>> f
    1347717491.343554
    >>> str(f)
    '1347717491.34'
    >>> "%f" % f
    '1347717491.343554'

Change-Id: I6eb02f7f6730eff814c348d1039eae4606642b52
This commit is contained in:
Nick Craig-Wood 2012-11-18 11:42:18 +00:00
parent 0053b4cf0e
commit 402d87c757

@ -807,7 +807,7 @@ def st_upload(parser, args, print_queue, error_queue):
obj = obj[2:]
if obj.startswith('/'):
obj = obj[1:]
put_headers = {'x-object-meta-mtime': str(getmtime(path))}
put_headers = {'x-object-meta-mtime': "%f" % getmtime(path)}
if dir_marker:
if options.changed:
try: