Revision 692485cc

b/snf-pithos-backend/pithos/backends/modular.py
1061 1061
            if node is not None:
1062 1062
                props = self.node.version_lookup(node, inf, CLUSTER_NORMAL)
1063 1063
            if props is not None:
1064
                if props[self.TYPE] in ('application/directory', 'application/folder'):
1064
                if props[self.TYPE].split(';', 1)[0].strip() in ('application/directory', 'application/folder'):
1065 1065
                    formatted.append((p.rstrip('/') + '/', self.MATCH_PREFIX))
1066 1066
                formatted.append((p, self.MATCH_EXACT))
1067 1067
        return formatted
......
1081 1081
                if node is not None:
1082 1082
                    props = self.node.version_lookup(node, inf, CLUSTER_NORMAL)
1083 1083
                if props is not None:
1084
                    if props[self.TYPE] in ('application/directory', 'application/folder'):
1084
                    if props[self.TYPE].split(';', 1)[0].strip() in ('application/directory', 'application/folder'):
1085 1085
                        return p
1086 1086
        return None
1087 1087
    
b/snf-pithos-tools/pithos/tools/fs.py
248 248
        gid = int(meta.get('x-account-meta-gid', 0))
249 249
        size = int(meta.get('content-length', 0))
250 250
        
251
        if meta['content-type'] == 'application/directory':
251
        if meta['content-type'].split(';', 1)[0].strip() == 'application/directory':
252 252
            mode = int(meta.get('x-object-meta-mode', 0755))
253 253
            flags = S_IFDIR
254 254
            nlink = 2
b/snf-pithos-tools/pithos/tools/sync.py
148 148
            meta = client.retrieve_object_metadata(self.container, path)
149 149
        except Fault:
150 150
            return 'DEL'
151
        if meta.get('content-type', None) == 'application/directory':
151
        if meta.get('content-type', '').split(';', 1)[0].strip() == 'application/directory':
152 152
            return 'DIR'
153 153
        else:
154 154
            return meta['x-object-hash']
......
292 292
            if 'subdir' in object:
293 293
                continue
294 294
            name = object['name']
295
            if object['content_type'] == 'application/directory':
295
            if object['content_type'].split(';', 1)[0].strip() == 'application/directory':
296 296
                dirs.add(name)
297 297
            else:
298 298
                files.add(name)

Also available in: Unified diff