def check_changes(folder):
    expected_files = set()

    expected_files.update(plug.list(folder).keys())

    for path in walkfiles(folder.path):
        path = u(path)

        if os.path.splitext(path)[1] == TMP_EXT:
            continue

        filename = folder.relpath(path)

        expected_files.discard(filename)

        metadata = plug.get_metadata(filename, folder)
        revision = metadata.extra.get('revision', 0.)

        try:
            mtime = os.path.getmtime(path)
        except (IOError, OSError) as e:
            raise ServiceError(
                u"Error updating file '{}': {}".format(metadata.path, e)
            )

        if revision > mtime:
            update(metadata, mtime)

    for filename in expected_files:
        metadata = plug.get_metadata(filename, folder)
        plug.delete_file(metadata)
dataset/ETHPy150Open onitu/onitu/drivers/local_storage/onitu_local_storage/local_storage.py/check_changes/swapped operands of `>`