Fix to quotemeta variables instead

This commit is contained in:
Ilia Ross
2023-11-06 13:28:22 +02:00
parent 46238ef7a1
commit 4b38af6b51
3 changed files with 8 additions and 8 deletions

View File

@@ -1553,7 +1553,7 @@ if ($folder->{'type'} == 1 || $folder->{'type'} == 3) {
&get_maildir_files($folder->{'file'}) :
&get_mhdir_files($folder->{'file'});
if ($folder->{'type'} == 1) {
foreach my $sf (glob("\"$folder->{'file'}\"/.??*")) {
foreach my $sf (glob("\Q$folder->{'file'}\E/.??*")) {
push(@files, &get_maildir_files($sf));
}
}
@@ -3643,7 +3643,7 @@ if (!%hasattach) {
}
else {
$hasattach_file = "$module_config_directory/attach";
if (!glob("\"$hasattach_file\".*")) {
if (!glob("\Q$hasattach_file\E.*")) {
$hasattach_file = "$module_var_directory/attach";
}
}

View File

@@ -1122,7 +1122,7 @@ foreach my $folder (&list_user_folders($user)) {
&unlink_file($ifile);
}
else {
&unlink_file(glob("\"$ifile\".{dir,pag,db}"));
&unlink_file(glob("\Q$ifile\E.{dir,pag,db}"));
}
&unlink_file("$ifile.ids");
}
@@ -1136,7 +1136,7 @@ foreach my $folder (&list_user_folders($user)) {
&unlink_file($ifile);
}
else {
&unlink_file(glob("\"$ifile\".{dir,pag,db}"));
&unlink_file(glob("\Q$ifile\E.{dir,pag,db}"));
}
}
# Remove read file
@@ -1145,7 +1145,7 @@ if (-r $read) {
&unlink_file($read);
}
else {
&unlink_file(glob("\"$read\".{dir,pag,db}"));
&unlink_file(glob("\Q$read\E.{dir,pag,db}"));
}
}
@@ -1280,7 +1280,7 @@ sub user_read_dbm_file
{
my ($user) = @_;
my $rv = "$module_config_directory/$user.read";
if (!glob("\"$rv\".*")) {
if (!glob("\Q$rv\E.*")) {
$rv = "$module_var_directory/$user.read";
}
return $rv;

View File

@@ -606,12 +606,12 @@ foreach my $dat (glob("$config{'minecraft_dir'}/*/level.dat")) {
if (-d "$path/players") {
# Old format
@players = map { s/^.*\///; s/\.dat$//; $_ }
glob("$path/players/*");
glob("\Q$path\E/players/*");
}
if (-d "$path/playerdata" && !@players) {
# New format (UUID based)
@players = map { s/^.*\///; s/\.dat$//; $_ }
glob("$path/playerdata/*");
glob("\Q$path\E/playerdata/*");
@players = map { my $u = $_;
&uuid_to_username($u) || $u } @players;
}