--- commands/pm/updatecode.pm.inc.orig  2010-06-14 16:39:25.000000000 -0500
+++ commands/pm/updatecode.pm.inc       2010-06-14 17:08:32.000000000 -0500
@@ -159,6 +159,17 @@ function _pm_update_core(&$project, $mod
   // not part of the update process
   $project['skip_list'] = array('backup', 'sites', $project['path']);

+  // Look for any custom profile directories, and add /profiles to the skip_list if found.
+  if ($handle = opendir($drupal_root . '/profiles')) {
+    while (false !== ($file = readdir($handle))) {
+      if ($file != 'default') {
+        $project['skip_list'][] = 'profiles';
+        break; // No need to keep looping if we've found one custom profile.
+      }
+    }
+    closedir($handle);
+  }
+  
   // Move all files and folders in $drupal_root to the new 'core' directory
   // except for the items in the skip list
   _pm_update_move_files($drupal_root, $project['full_project_path'], $project['skip_list']);
