Index: commands/pm/pm.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/pm/pm.drush.inc,v
retrieving revision 1.132
diff -u -p -r1.132 pm.drush.inc
--- commands/pm/pm.drush.inc	30 Oct 2010 19:37:08 -0000	1.132
+++ commands/pm/pm.drush.inc	1 Nov 2010 06:44:55 -0000
@@ -84,7 +84,7 @@ function pm_drush_help($section) {
 If no destination is provided, then it depends on the project type:
   - Profiles will be downloaded to profiles/ in your Drupal root.
   - Translations will be decompressed from your Drupal root.
-  - Modules and themes will be downloaded to the site specific directory (sites/example.com/modules|themes if available) or to sites/all/modules|themes.
+  - Modules and themes will be downloaded to the site specific directory (sites/example.com/modules[/contrib]|themes if it exists) or to sites/all/modules[/contrib]|themes.
   - If you're downloading drupal core or you are not running the command within a bootstrapped drupal site, the default location is the current directory.
   - Drush commands will be relocated to /usr/share/drush/commands (if available) or ~/.drush. Relocation is determined once the project is downloaded by examining its content. Note you can provide your own function in a commandfile to determine the relocation of any project.");
   }
@@ -1019,15 +1019,24 @@ function drush_pm_updatecode_notify_pend
 function pm_dl_destination_lookup($type, $drupal_root, $sitepath, $create = FALSE) {
   switch ($type) {
     case 'module':
-      // Prefer sites/all/modules/contrib if it exists.
-      $destination = $sitepath . '/modules';
+      if (is_dir($modules_path_dest = conf_path() . '/modules')) {
+        $destination = $modules_path_dest;
+      }
+      else {
+        $destination = $sitepath . '/modules';
+      }
       $contrib = $destination . '/contrib';
       if (is_dir($contrib)) {
         $destination = $contrib;
       }
       break;
     case 'theme':
-      $destination = $sitepath . '/themes';
+      if (is_dir($themes_path_dest = conf_path() . '/themes')) {
+        $destination = $themes_path_dest;
+      }
+      else {
+        $destination = $sitepath . '/themes';
+      }
       break;
