From 92e25ffcc5edf5d1a9996bfb921b5a95b826134b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 7 Oct 2026 21:25:47 +0200 Subject: fix(node): drop a directory moved out of the root on Windows too On Windows watchdog cannot tell what a deleted path was -- it is gone -- and reports a directory moved out of the root as a file deleted, so the fix in 3d5a168 never ran there and test_the_watcher_reports_a_directory_moved_out failed. A deleted path the index still holds entries below was a directory. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/src/meshbay_node/indexer/indexer.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/meshbay-node/src/meshbay_node/indexer/indexer.py') diff --git a/packages/meshbay-node/src/meshbay_node/indexer/indexer.py b/packages/meshbay-node/src/meshbay_node/indexer/indexer.py index 732b499..f06d30f 100644 --- a/packages/meshbay-node/src/meshbay_node/indexer/indexer.py +++ b/packages/meshbay-node/src/meshbay_node/indexer/indexer.py @@ -1274,6 +1274,12 @@ class DirectoryIndexer: if not root.available: return + # On Windows watchdog cannot tell what a deleted path was -- it is + # gone -- and reports a directory moved out as a *file* deleted. + # A path the index still holds entries below was a directory. + if not directory and deleted and self._entries_in_dir(root, file_path): + directory = True + if directory: if file_path == root.path or not await off_disk( self.roots, self._dir_left_the_root, file_path): -- cgit v1.2.3