Commit a759aeeb authored by Robert Ricci's avatar Robert Ricci

Fix DoneIfEdited and DoneIfIdentical, which became conjoined twins

through some sort of freak copy-paste accident.
parent cab390c9
......@@ -244,11 +244,8 @@ sub DoneIfEdited($) {
my ($filename) = @_;
if (!$filename) { PhaseFail("Bad filename passed to DoneIfEdited"); }
open(FH,$filename) or return;
if (!-e $filename1 || !-e $filename2) {
return;
}
if (!ExecQuiet("cmp -s $filename1 $filename2")) {
PhaseSkip("Files $filename1 and $filename2 are identical");
if (grep /$MAGIC_STRING/, <FH>) {
PhaseSkip("File $filename has already been edited\n");
}
}
......@@ -261,9 +258,11 @@ sub DoneIfIdentical($$) {
if (!$filename1 || !$filename2) {
PhaseFail("Bad filename passed to DoneIfIdentical");
}
open(FH,$filename1) or return;
if (grep /$MAGIC_STRING/, <FH>) {
PhaseSkip("File $filename has already been edited\n");
if (!-e $filename1 || !-e $filename2) {
return;
}
if (!ExecQuiet("cmp -s $filename1 $filename2")) {
PhaseSkip("Files $filename1 and $filename2 are identical");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment