# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- /Users/rene/Sites/d7/includes/bootstrap.inc
+++ /Users/rene/Sites/d7-dev/drupal/includes/bootstrap.inc
@@ -677,10 +677,11 @@
   // before we have a database connection (i.e. during installation) and
   // when a database connection fails.
   else {
+
     try {
       if (function_exists('db_query')) {
         $file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField();
-        if (file_exists(DRUPAL_ROOT . '/' . $file && $file != '')) {
+        if (file_exists(DRUPAL_ROOT . '/' . $file)) {
           $files[$type][$name] = $file;
         }
       }
@@ -692,7 +693,9 @@
     }
     // Fallback to searching the filesystem if the database could not find the
     // file or the file returned by the database is not found.
+
     if (!isset($files[$type][$name])) {
+
       // We have a consistent directory naming: modules, themes...
       $dir = $type . 's';
       if ($type == 'theme_engine') {
