Fixes for file-watching, user assets, and system dependencies (#2)

* fix: avoid panics in case of non-existing path for watching

* fix: copy the themes and plugins

* Revert "add a few more libraries to the linux script"

This reverts commit 7509677003.

* fix: add vulkan validation layers to the system deps

* fix: fix the themes paths
This commit is contained in:
Amin Yahyaabadi 2024-02-06 22:54:40 -08:00 committed by GitHub
parent 11964dc731
commit d3562d4c9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 9 deletions

View file

@ -287,12 +287,17 @@ impl Fs for RealFs {
) -> Pin<Box<dyn Send + Stream<Item = Vec<Event>>>> {
let (tx, rx) = smol::channel::unbounded();
if !path.exists() {
log::error!("watch path does not exist: {}", path.display());
return Box::pin(rx);
}
let mut watcher = notify::recommended_watcher(move |res| match res {
Ok(event) => {
let _ = tx.try_send(vec![event]);
}
Err(err) => {
eprintln!("watch error: {:?}", err);
log::error!("watch error: {}", err);
}
})
.unwrap();