--- rdf_entity.install	2022-02-25 14:29:50.421221686 +0000
+++ rdf_entity.install	2022-02-25 14:33:33.297062131 +0000
@@ -116,11 +116,14 @@
       foreach ($extensions as $extension_name) {
         $extension_path = drupal_get_path($extension_type, $extension_name);
         foreach (['install', 'optional'] as $sub_path) {
-          foreach ($file_system->scanDirectory("$extension_path/config/$sub_path", $file_pattern) as $path => $file) {
+          $config_files_path = "$extension_path/config/$sub_path";
+          if (is_dir($config_files_path)) {
+            foreach ($file_system->scanDirectory($config_files_path, $file_pattern) as $path => $file) {
             $new_config_candidates[$path] = $file->name;
           }
         }
       }
+      }
     }
 
     foreach ($config_factory->listAll("rdf_entity.$type.") as $old_config_name) {
