Fix to only check for uniqueness

This commit is contained in:
Ilia Ross
2026-01-26 22:55:18 +02:00
parent bfb496ca29
commit e6184a0036

View File

@@ -415,10 +415,10 @@ push(@can_dirs, $gconfig{'tempdir_sys'}) if ($gconfig{'tempdir_sys'});
# Common fallbacks # Common fallbacks
push(@can_dirs, "/dev/shm", "/tmp", "/var/tmp", "/usr/tmp"); push(@can_dirs, "/dev/shm", "/tmp", "/var/tmp", "/usr/tmp");
# Remove empty and duplicate entries, which can happen when both configured # Remove duplicate entries, which can happen when both configured dirs are set
# dirs are set to the same path, or when a configured path matches one of # to the same path, or when a configured path matches one of the built-in
# the built-in defaults # defaults
@can_dirs = &unique(grep { $_ } @can_dirs); @can_dirs = &unique(@can_dirs);
# Test each candidate in turn # Test each candidate in turn
for my $dir (@can_dirs) { for my $dir (@can_dirs) {