From ef4213df55e0d3a9eeffc5235ef558b73f166f06 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sun, 30 Jun 2019 16:04:46 -0700 Subject: [PATCH] Handle case where some paths are listed twice https://github.com/Real-Gecko/Filemin/issues/144 --- filemin/filemin-lib.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/filemin/filemin-lib.pl b/filemin/filemin-lib.pl index 9ed3bddbb..7aea82838 100644 --- a/filemin/filemin-lib.pl +++ b/filemin/filemin-lib.pl @@ -67,6 +67,7 @@ sub get_paths { @allowed_paths = map { $_ eq '$HOME' ? @remote_user_info[7] : $_ } @allowed_paths; @allowed_paths = map { s/\$USER/$remote_user/g; $_ } @allowed_paths; + @allowed_paths = &unique(@allowed_paths); if (scalar(@allowed_paths) == 1) { $base = $allowed_paths[0]; } else {