def fs_decode(path):
    """
    Decode a filesystem path using the proper filesystem encoding

    :param path: The filesystem path to decode from bytes or string
    :return: [description]
    :rtype: [type]
    """

    path = _get_path(path)
    if path is None:
        raise TypeError("expected a valid path to decode")
    if isinstance(path, six.binary_type):
        path = path.decode(_fs_encoding, _fs_decode_errors)
    return path