def _fixIfWindowsPath(filename):
    """Convert Windows-style path to valid local URL.
    CifFile loads files using urlopen, which fails for Windows-style paths.

    filename -- path to be fixed

    Return fixed URL when run on Windows, otherwise return filename.
    """
    rv = filename
    if filename[:1].isalpha() and filename[1:3] == ':\\':
        from urllib.request import pathname2url
        rv = pathname2url(filename)
    return rv
