Updated the swift tool so that when uploading an object giving the full path, such as e.g: /etc/vim/vimrc , it will strip the initial "/" from the object name.

This commit is contained in:
Marcelo Martins
2011-08-12 18:53:12 +00:00
committed by Tarmac

View File

@@ -1607,6 +1607,8 @@ def st_upload(options, args, print_queue, error_queue):
obj = path
if obj.startswith('./') or obj.startswith('.\\'):
obj = obj[2:]
if obj.startswith('/'):
obj = obj[1:]
put_headers = {'x-object-meta-mtime': str(getmtime(path))}
if dir_marker:
if options.changed: