def GetZipPath(file, dir, dirname):
    """Given an absolute file path, an absolute directory path, and the dirname
    of the directory, return a relative path to the file from the parent
    directory of the given directory, with unix-style path separators.
    """
    file = dirname + file[len(dir):]
    return file.replace("\\", "/")