Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c	(revision 20396)
+++ gtk/gtkfilechooserdefault.c	(working copy)
@@ -6781,7 +6781,9 @@
 
  maybe_clear_entry:
 
-  if (impl->browse_files_last_selected_name)
+  if (   (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+	  impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
+	&& impl->browse_files_last_selected_name)
     {
       const char *entry_text;
       int len;
