diff --git a/crates/worktree/src/worktree.rs b/crates/worktree/src/worktree.rs index 4f51019dd7443413aa01e6cfa44e6e62b02f9b8c..9031fa30574afeea4dc99f5d524005e2f0c547b2 100644 --- a/crates/worktree/src/worktree.rs +++ b/crates/worktree/src/worktree.rs @@ -3073,12 +3073,10 @@ impl BackgroundScannerState { .add(&common_dir_abs_path) .context("failed to add common directory to watcher") .log_err(); - if !repository_dir_abs_path.starts_with(&common_dir_abs_path) { - watcher - .add(&repository_dir_abs_path) - .context("failed to add repository directory to watcher") - .log_err(); - } + watcher + .add(&repository_dir_abs_path) + .context("failed to add repository directory to watcher") + .log_err(); let work_directory_id = work_dir_entry.id;