зеркало из https://github.com/mozilla/pjs.git
Bug 251866 - apparently with some perls or OSes if you read from a <FILE> in the middle of reading from a <STDIN> pipe you get corrupted file positions on STDIN. Workaround this by reading all of the STDIN pipe before processing it. r=bz
This commit is contained in:
Родитель
02e3ec5b9e
Коммит
25dce53454
|
@ -464,7 +464,9 @@ sub EnsureFileInDir
|
|||
return 0;
|
||||
}
|
||||
|
||||
while (<STDIN>) {
|
||||
my @gLines = <STDIN>;
|
||||
|
||||
while (defined($_ = shift @gLines)) {
|
||||
chomp;
|
||||
|
||||
start:
|
||||
|
@ -474,7 +476,7 @@ start:
|
|||
my $overrides = "";
|
||||
my $cwd = cwd();
|
||||
print "+++ making chrome $cwd => $chromeDir/$jarfile.jar\n";
|
||||
while (<STDIN>) {
|
||||
while (defined($_ = shift @gLines)) {
|
||||
if (/^\s+([\w\d.\-\_\\\/\+]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
|
||||
my $dest = $1;
|
||||
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;
|
||||
|
|
Загрузка…
Ссылка в новой задаче