Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 19758)
+++ wp-includes/theme.php	(working copy)
@@ -350,9 +350,9 @@
 			while ( ($file = $stylesheet_dir->read()) !== false ) {
 				if ( !preg_match('|^\.+$|', $file) ) {
 					if ( preg_match('|\.css$|', $file) )
-						$stylesheet_files[] = "$theme_root/$stylesheet/$file";
+						$stylesheet_files[] = "$file";
 					elseif ( preg_match('|\.php$|', $file) )
-						$template_files[] = "$theme_root/$stylesheet/$file";
+						$template_files[] = "$file";
 				}
 			}
 			@ $stylesheet_dir->close();
@@ -364,7 +364,7 @@
 				if ( preg_match('|^\.+$|', $file) )
 					continue;
 				if ( preg_match('|\.php$|', $file) ) {
-					$template_files[] = "$template_directory/$file";
+					$template_files[] = "$file";
 				} elseif ( is_dir("$template_directory/$file") ) {
 					$template_subdir = @ dir("$template_directory/$file");
 					if ( !$template_subdir )
@@ -373,7 +373,7 @@
 						if ( preg_match('|^\.+$|', $subfile) )
 							continue;
 						if ( preg_match('|\.php$|', $subfile) )
-							$template_files[] = "$template_directory/$file/$subfile";
+							$template_files[] = "$file/$subfile";
 					}
 					@ $template_subdir->close();
 				}
Index: wp-admin/theme-editor.php
===================================================================
--- wp-admin/theme-editor.php	(revision 19758)
+++ wp-admin/theme-editor.php	(working copy)
@@ -55,8 +55,17 @@
 if ( ! isset($themes[$theme]) )
 	wp_die(__('The requested theme does not exist.'));
 
-$allowed_files = array_merge( $themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files'] );
 
+$stylefiles = $themes[$theme]['Stylesheet Files'];
+foreach ( $stylefiles as $key => $filename )
+	$stylefiles[$key] = $themes[$theme]['Stylesheet Dir'] . '/' . $filename;
+
+$themefiles = $themes[$theme]['Template Files'];
+foreach ( $themefiles as $key => $filename )
+	$themefiles[$key] = $themes[$theme]['Template Dir'] . '/' . $filename;
+
+$allowed_files = array_merge( $stylefiles, $themefiles );
+
 if ( empty( $file ) ) {
 	if ( false !== array_search( $themes[$theme]['Stylesheet Dir'] . '/style.css', $allowed_files ) )
 		$file = $themes[$theme]['Stylesheet Dir'] . '/style.css';
@@ -65,9 +74,9 @@
 } else {
 	$file = stripslashes($file);
 	if ( 'theme' == $dir ) {
-		$file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ;
+		$file = $themes[$theme]['Template Dir'] . '/' . $file ;
 	} else if ( 'style' == $dir) {
-		$file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ;
+		$file = $themes[$theme]['Stylesheet Dir'] . '/' . $file ;
 	}
 }
 
