'Cleanup relative DiskFile directories.
If the partition power is increased soon or has just been increased but
the relinker didn\'t yet cleanup the old files, an additional cleanup of
the relative dirs has to be done. Otherwise there might be some unused
files left if a PUT or DELETE is done in the meantime
:param cur_path: current full path to an object file
:param new_path: recomputed path to an object file, based on the
next_part_power set in the ring'

def _part_power_cleanup(self, cur_path, new_path):

    if (new_path is None):
        return
    if (new_path != cur_path):
        new_target_dir = os.path.dirname(new_path)
        try:
            self.manager.cleanup_ondisk_files(new_target_dir)
        except OSError:
            logging.exception(_('Problem    cleaning    up    %s'), new_target_dir)
    else:
        prev_part_power = (int(self.next_part_power) - 1)
        old_target_path = replace_partition_in_path(cur_path, prev_part_power)
        old_target_dir = os.path.dirname(old_target_path)
        try:
            self.manager.cleanup_ondisk_files(old_target_dir)
        except OSError:
            logging.exception(_('Problem    cleaning    up    %s'), old_target_dir)
