improve max files watch error

tzemanovic
Feb 7, 2026, 8:46 PM
FAV4DXFAHNVYZAR6TT6D7KBMZCMTRCCTQ3UHJ2AOLNYUKGMC23EQC

Dependencies

  • [2] SEJXDXPW improve file watcher to respect .ignore file
  • [3] ACDXXAX2 refactor main's updates into smaller fns
  • [*] 6YZAVBWU Initial commit

Change contents

  • edit in inflorescence/src/main.rs at line 1870
    [2.3668]
    [2.3668]
    let mut already_got_max_files_err = false;
  • replacement in inflorescence/src/main.rs at line 1881
    [2.4007][2.4007:4168]()
    let msg = format!(
    "Error setting up file watch for path {}: {err:?}",
    entry.path().to_string_lossy()
    );
    [2.4007]
    [2.4168]
    let msg = if let notify::ErrorKind::MaxFilesWatch = &err.kind {
    {
    if already_got_max_files_err {
    continue;
    } else {
    already_got_max_files_err = true;
    }
    }
    #[cfg(target_os = "linux")]
    const HELP: &str = " Consider increasing the limits (`fs.inotify.max_user_instances` and/or `fs.inotify.max_user_watches`)";
    #[cfg(not(target_os = "linux"))]
    const MORE: &str = "";
    format!("Error setting up file watch. Reached a maximum.{HELP}")
    } else {
    format!(
    "Error setting up file watch for path {}: {err:?}",
    entry.path().to_string_lossy()
    )
    };