diff --git a/repos/gems/run/fs_query.run b/repos/gems/run/fs_query.run
index 791e3cbc48..c928de15e3 100644
--- a/repos/gems/run/fs_query.run
+++ b/repos/gems/run/fs_query.run
@@ -81,7 +81,9 @@ install_config {
+
+
@@ -154,6 +156,19 @@ install_config {
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/repos/gems/src/app/fs_query/main.cc b/repos/gems/src/app/fs_query/main.cc
index a1a4592668..492933de4e 100644
--- a/repos/gems/src/app/fs_query/main.cc
+++ b/repos/gems/src/app/fs_query/main.cc
@@ -234,7 +234,12 @@ struct Fs_query::Main : Vfs::Watch_response_handler
config.for_each_sub_node("query", [&] (Xml_node query) {
Directory::Path const path = query.attribute_value("path", Directory::Path());
- new (_heap) Registered(_dirs, _heap, _root_dir, path, *this);
+ try {
+ new (_heap)
+ Registered(
+ _dirs, _heap, _root_dir, path, *this);
+ }
+ catch (Genode::Directory::Nonexistent_directory) { }
});
_reporter.generate([&] (Xml_generator &xml) {