--- ./d7/includes/bootstrap.inc	2010-11-04 20:01:46.000000000 +0100
+++ ./d7-dev/drupal/includes/bootstrap.inc	2010-11-04 19:48:44.000000000 +0100
@@ -677,11 +677,10 @@ function drupal_get_filename($type, $nam
   // 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;
         }
       }
@@ -693,9 +692,7 @@ function drupal_get_filename($type, $nam
     }
     // 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') {
