Index: src/nautilus-shell.c
===================================================================
--- src/nautilus-shell.c	(revisión: 14443)
+++ src/nautilus-shell.c	(copia de trabajo)
@@ -128,6 +128,9 @@ open_window (NautilusShell *shell, const
 	     const char *geometry, gboolean browser_window)
 {
 	GFile *location;
+	GFile *location_dir;
+	GList *selection = NULL;
+	GFileType file_type;
 	NautilusWindow *window;
 
 	if (browser_window ||
@@ -139,8 +142,19 @@ open_window (NautilusShell *shell, const
 			nautilus_window_go_home (window);
 		} else {
 			location = g_file_new_for_uri (uri);
-			nautilus_window_go_to (window, location);
-			g_object_unref (location);
+			file_type = g_file_query_file_type (location, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
+
+			if (file_type != G_FILE_TYPE_DIRECTORY && file_type != G_FILE_TYPE_UNKNOWN) {
+				location_dir = g_file_get_parent (location);
+				selection = g_list_prepend (selection, location);
+				nautilus_window_go_to_with_selection (window, location_dir, selection);
+				g_object_unref (location);
+				g_object_unref (location_dir);
+				g_list_free (selection);
+			} else {
+				nautilus_window_go_to (window, location);
+				g_object_unref (location);
+			}
 		}
 	} else {
 		if (uri == NULL) {
@@ -149,12 +163,29 @@ open_window (NautilusShell *shell, const
 			location = g_file_new_for_uri (uri);
 		}
 		
-		window = nautilus_application_present_spatial_window (shell->details->application,
-								      NULL,
-								      startup_id,
-								      location,
-								      gdk_screen_get_default ());
+		file_type = g_file_query_file_type (location, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
+
+		if (file_type != G_FILE_TYPE_DIRECTORY && file_type != G_FILE_TYPE_UNKNOWN) {
+			location_dir = g_file_get_parent (location);
+			selection = g_list_prepend (selection, location);			
+			window = nautilus_application_present_spatial_window_with_selection (shell->details->application,
+										             NULL,
+										             startup_id,
+										             location_dir,
+										             selection,
+										             gdk_screen_get_default ());
+			g_object_unref (location_dir);
+		} else {
+			window = nautilus_application_present_spatial_window (shell->details->application,
+									      NULL,
+									      startup_id,
+									      location,
+									      gdk_screen_get_default ());
+		}
 		g_object_unref (location);
+		if (selection) {
+			g_list_free (selection);
+		}
 	}
 	
 	if (geometry != NULL && !GTK_WIDGET_VISIBLE (window)) {
