From fc1fb3ea5d95515f30c22dce56e4ea51a56e7303 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 7 Nov 2023 14:47:40 +0000 Subject: [PATCH] Give full tree updates as root message rather than everything as update messages --- cista/watching.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cista/watching.py b/cista/watching.py index 4005eaf..df98116 100644 --- a/cista/watching.py +++ b/cista/watching.py @@ -87,15 +87,7 @@ def format_du(): def format_tree(): root = tree[""] - return msgspec.json.encode( - { - "update": [ - UpdateEntry( - key=root.key, size=root.size, mtime=root.mtime, dir=root.dir - ), - ], - }, - ).decode() + return msgspec.json.encode({"root": root}).decode() def walk(path: Path) -> DirEntry | FileEntry | None: