mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
fix: restore RescanRequired classification in debouncer-full error handler
The non-macOS debouncer-full error callback was classifying all errors as WatcherError, missing the empty-paths check that identifies rescan requests. The default error handler treats RescanRequired as recoverable (log + continue) but WatcherError as fatal (process::exit). This meant inotify queue overflows would kill the process instead of triggering a recoverable rescan.
This commit is contained in:
parent
a727881e6f
commit
34375d1339
1 changed files with 7 additions and 3 deletions
|
|
@ -198,9 +198,13 @@ impl StdBackend {
|
||||||
}
|
}
|
||||||
Err(errors) => {
|
Err(errors) => {
|
||||||
for error in errors {
|
for error in errors {
|
||||||
let critical_err = WatcherCriticalError::WatcherError {
|
let critical_err = if error.paths.is_empty() {
|
||||||
error: format!("{:?}", error.kind),
|
WatcherCriticalError::RescanRequired
|
||||||
path: error.paths.first().cloned(),
|
} else {
|
||||||
|
WatcherCriticalError::WatcherError {
|
||||||
|
error: format!("{:?}", error.kind),
|
||||||
|
path: error.paths.first().cloned(),
|
||||||
|
}
|
||||||
};
|
};
|
||||||
let _ = error_tx.send(critical_err.clone());
|
let _ = error_tx.send(critical_err.clone());
|
||||||
if error_handler(critical_err) {
|
if error_handler(critical_err) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue