diff --git a/src/filemanager/find.c b/src/filemanager/find.c index e0956d00e..c06be6dda 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -772,8 +772,11 @@ find_parameters (char **start_dir, ssize_t * start_dir_len, *content = (options.content_use && in_with->buffer[0] != '\0') ? g_strdup (in_with->buffer) : NULL; + if (in_name->buffer[0] != '\0') + *pattern = g_strdup (in_name->buffer); + else + *pattern = g_strdup (options.file_pattern ? "*" : ".*"); *start_dir = in_start->buffer[0] != '\0' ? in_start->buffer : (char *) "."; - *pattern = g_strdup (in_name->buffer); if (in_start_dir != INPUT_LAST_TEXT) g_free (in_start_dir); in_start_dir = g_strdup (*start_dir);