Revision 6d817842 pithos/api/util.py

b/pithos/api/util.py
160 160
        hash = ''
161 161
        bytes = 0
162 162
        try:
163
            src_container, src_name = split_container_object_string(meta['X-Object-Manifest'])
163
            src_container, src_name = split_container_object_string('/' + meta['X-Object-Manifest'])
164 164
            objects = backend.list_objects(request.user, v_account, src_container, prefix=src_name, virtual=False)
165 165
            for x in objects:
166 166
                src_meta = backend.get_object_meta(request.user, v_account, src_container, x[0], x[1])
......
209 209
            raise NotModified('Resource Etag matches')
210 210

  
211 211
def split_container_object_string(s):
212
    if not len(s) > 0 or s[0] != '/':
213
        raise ValueError
214
    s = s[1:]
212 215
    pos = s.find('/')
213 216
    if pos == -1:
214 217
        raise ValueError

Also available in: Unified diff