Handle case where some paths are listed twice https://github.com/Real-Gecko/Filemin/issues/144

This commit is contained in:
Jamie Cameron
2019-06-30 16:04:46 -07:00
parent e0c2b84913
commit ef4213df55

View File

@@ -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 {