'Handle casing differences for different filesystems.'

def _NormalizeCaseForPath(self, path, vfs_type):

    if (self.supported_pathtype == rdf_paths.PathSpec.PathType.REGISTRY):
        self.path = self.path.replace('\\', '/')
        parts = path.split('/')
        if (vfs_type == aff4_grr.VFSFile):
            lower_parts = [x.lower() for x in parts[0:(-1)]]
            lower_parts.append(parts[(-1)])
            path = utils.Join(*lower_parts)
        else:
            path = utils.Join(*[x.lower() for x in parts])
    return path
