(do_find): minor refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-05-18 19:42:10 +03:00
parent 615eda6e9e
commit 3972b7d502
1 changed files with 5 additions and 8 deletions

View File

@ -1845,14 +1845,11 @@ do_find (WPanel * panel, const char *start_dir, ssize_t start_dir_len, const cha
name = mc_build_filename (location->dir, lc_filename, (char *) NULL);
/* skip initial start dir */
if (start_dir_len < 0)
p = name;
else
{
p = name + (size_t) start_dir_len;
if (IS_PATH_SEP (*p))
p++;
}
p = name;
if (start_dir_len > 0)
p += (size_t) start_dir_len;
if (IS_PATH_SEP (*p))
p++;
if (!handle_path (p, &st, &link_to_dir, &stale_link))
{