Revision a06c276e snf-pithos-backend/pithos/backends/modular.py

b/snf-pithos-backend/pithos/backends/modular.py
1064 1064
        dest_meta = dest_meta or {}
1065 1065
        dest_version_ids = []
1066 1066
        self._can_read(user, src_account, src_container, src_name)
1067
        path, node = self._lookup_object(src_account, src_container, src_name,
1068
                                         lock_container=True)
1067

  
1068
        src_container_path = '/'.join((src_account, src_container))
1069
        dest_container_path = '/'.join((dest_account, dest_container))
1070
        # Lock container paths in alphabetical order
1071
        if src_container_path < dest_container_path:
1072
            self._lookup_container(src_account, src_container)
1073
            self._lookup_container(dest_account, dest_container)
1074
        else:
1075
            self._lookup_container(dest_account, dest_container)
1076
            self._lookup_container(src_account, src_container)
1077

  
1078
        path, node = self._lookup_object(src_account, src_container, src_name)
1069 1079
        # TODO: Will do another fetch of the properties in duplicate version...
1070 1080
        props = self._get_version(
1071 1081
            node, src_version)  # Check to see if source exists.

Also available in: Unified diff