mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Merge pull request #2043 from webmin/dev/qq-in-glob
Fix to `quotemeta` variables instead
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user