The code to fail when new subject's file exists failed always. Fix.
This commit is contained in:
parent
0fe877e1cd
commit
7203926ea4
1 changed files with 4 additions and 2 deletions
|
@ -90,9 +90,11 @@ for my $t (keys %subjfil) {
|
||||||
unless (grep(/^$t$/, @Subjects)) {
|
unless (grep(/^$t$/, @Subjects)) {
|
||||||
print STDERR "WARNING: $t is a NEW subject\n";
|
print STDERR "WARNING: $t is a NEW subject\n";
|
||||||
my $fname = "info/$t.t";
|
my $fname = "info/$t.t";
|
||||||
print STDERR "File $fname exists\n" if -e $fname;
|
if (-e $fname) {
|
||||||
|
print STDERR "File $fname exists\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@Subjects = sort keys %subjfil;
|
@Subjects = sort keys %subjfil;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue