diff options
Diffstat (limited to 'crates/vfs-notify')
-rw-r--r-- | crates/vfs-notify/src/lib.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index 5b4978285..b3d7c414c 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs | |||
@@ -89,8 +89,8 @@ impl LoaderActor { | |||
89 | match event { | 89 | match event { |
90 | Event::Message(msg) => match msg { | 90 | Event::Message(msg) => match msg { |
91 | Message::Config(config) => { | 91 | Message::Config(config) => { |
92 | let n_entries_total = config.load.len(); | 92 | let n_total = config.load.len(); |
93 | self.send(loader::Message::Progress { n_entries_total, n_entries_done: 0 }); | 93 | self.send(loader::Message::Progress { n_total, n_done: 0 }); |
94 | 94 | ||
95 | self.unwatch_all(); | 95 | self.unwatch_all(); |
96 | self.config.clear(); | 96 | self.config.clear(); |
@@ -99,10 +99,7 @@ impl LoaderActor { | |||
99 | let watch = config.watch.contains(&i); | 99 | let watch = config.watch.contains(&i); |
100 | let files = self.load_entry(entry, watch); | 100 | let files = self.load_entry(entry, watch); |
101 | self.send(loader::Message::Loaded { files }); | 101 | self.send(loader::Message::Loaded { files }); |
102 | self.send(loader::Message::Progress { | 102 | self.send(loader::Message::Progress { n_total, n_done: i + 1 }); |
103 | n_entries_total, | ||
104 | n_entries_done: i + 1, | ||
105 | }); | ||
106 | } | 103 | } |
107 | self.config.sort_by(|x, y| x.0.cmp(&y.0)); | 104 | self.config.sort_by(|x, y| x.0.cmp(&y.0)); |
108 | } | 105 | } |