mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
fix(cli): Skip File Access events in dev server (#12297)
This commit is contained in:
6
.changes/fix-cli-dev-server-reload.md
Normal file
6
.changes/fix-cli-dev-server-reload.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
tauri-cli: 'patch:bug'
|
||||
'@tauri-apps/cli': 'patch:bug'
|
||||
---
|
||||
|
||||
Fixed an issue that caused the built-in dev server to constantly refresh on Linux. This only affected users who do not have `devUrl` point to a URL.
|
||||
@@ -170,8 +170,12 @@ fn watch<F: Fn() + Send + 'static>(dir: PathBuf, handler: F) {
|
||||
.expect("builtin server failed to watch dir");
|
||||
|
||||
loop {
|
||||
if rx.recv().is_ok() {
|
||||
handler();
|
||||
if let Ok(Ok(event)) = rx.recv() {
|
||||
if let Some(event) = event.first() {
|
||||
if !event.kind.is_access() {
|
||||
handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user