From ebd6c95e838a5adbd3f08061f2ca8a26924ffa31 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 6 Feb 2016 18:00:11 +0300 Subject: [PATCH] Ticket #3593: Find file: empty file name matches any file name. Signed-off-by: Andrew Borodin --- src/filemanager/find.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);