Switch all calls to open() to explicitly open for read

This commit is contained in:
Jamie Cameron
2020-03-14 17:20:54 -07:00
parent 3093838b5b
commit a2dc3f7124
248 changed files with 548 additions and 552 deletions

View File

@@ -495,7 +495,7 @@ else {
}
# Validate archive
open(FILE, $file);
open(FILE, "<".$file);
my $two;
read(FILE, $two, 2);
close(FILE);
@@ -537,7 +537,7 @@ my %mfiles;
my @files;
while($m = readdir(DIR)) {
next if ($m eq "." || $m eq ".." || !$hasmod{$m});
open(MAN, "$manifests_dir/$m");
open(MAN, "<$manifests_dir/$m");
my @mfiles;
while(<MAN>) {
s/\r|\n//g;

View File

@@ -49,7 +49,7 @@ else {
}
print "Content-type: application/x-gzip\n\n";
my $buf;
open(TEMP, $temp);
open(TEMP, "<$temp");
while(read(TEMP, $buf, 1024)) {
print $buf;
}