Force files to be read as binary to avoid line-ending issues on win32.

Bug #196499


git-svn-id: svn://10.0.0.236/trunk@144069 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
seawood%netscape.com 2003-06-23 21:36:19 +00:00
parent e55bfffc55
commit cfd504bcef

View File

@ -66,6 +66,7 @@ mozLock($lockfile) unless $nofilelocks;
undef @inbuf;
if ( -e "$file" ) {
open(IN, "$file") || die ("$file: $!\n");
binmode(IN);
while ($tmp = <IN>) {
chomp($tmp);
push @inbuf, $tmp;
@ -84,6 +85,7 @@ $count = $#outbuf + 1;
# Append new entry to file
if ($count) {
open(OUT, ">>$file") || die ("$file: $!\n");
binmode(OUT);
foreach $entry (@outbuf) {
print OUT "$entry\n";
}