diff --git a/commands/pm/download.pm.inc b/commands/pm/download.pm.inc
index b6deb4b..8017ae9 100644
--- a/commands/pm/download.pm.inc
+++ b/commands/pm/download.pm.inc
@@ -327,7 +327,7 @@ function _pm_download_destination($type) {
 
   $in_site_directory = FALSE;
   // Check if we are running within the site directory.
-  if ($full_site_root == substr(drush_cwd(), 0, strlen($full_site_root)) || (drush_get_option('use-site-dir', FALSE))) {
+  if ($full_site_root == substr(realpath(drush_cwd()), 0, strlen(realpath($full_site_root))) || (drush_get_option('use-site-dir', FALSE))) {
     $in_site_directory = TRUE;
   }
 
