Ticket #3593: Find file: empty file name matches any file name.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-02-06 18:00:11 +03:00
parent 47a86b3362
commit ebd6c95e83

View File

@ -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;
*start_dir = in_start->buffer[0] != '\0' ? in_start->buffer : (char *) ".";
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 *) ".";
if (in_start_dir != INPUT_LAST_TEXT)
g_free (in_start_dir);
in_start_dir = g_strdup (*start_dir);