Skip to content

Commit cb96aa0

Browse files
authored
fix(fs): rename dir field to base_dir in WatchOptions, fixes #1081 (#1082)
* fix(fs): rename `dir` field to `base_dir` in `WatchOptions`, fixes #1081 * Create fix-fs-watcher-basedir.md
1 parent 1d7dc86 commit cb96aa0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changes/fix-fs-watcher-basedir.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fs": patch
3+
---
4+
5+
Fixes `watch` and `watchImmediate` which previously ignored the `baseDir` parameter.

plugins/fs/src/watcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn watch_debounced(on_event: Channel, rx: Receiver<DebounceEventResult>) {
7575
#[derive(Deserialize)]
7676
#[serde(rename_all = "camelCase")]
7777
pub struct WatchOptions {
78-
dir: Option<BaseDirectory>,
78+
base_dir: Option<BaseDirectory>,
7979
recursive: bool,
8080
delay_ms: Option<u64>,
8181
}
@@ -96,7 +96,7 @@ pub async fn watch<R: Runtime>(
9696
&global_scope,
9797
&command_scope,
9898
path,
99-
options.dir,
99+
options.base_dir,
100100
)?);
101101
}
102102

0 commit comments

Comments
 (0)