Verify that files are not duplicated in the MANIFEST.
Keep a hash so that file output to the MANIFEST file doesn't have duplicates of the same file name in it.
This commit is contained in:
parent
10d3f55933
commit
32e51f65a1
1 changed files with 3 additions and 1 deletions
|
|
@ -96,6 +96,7 @@ print MANIFEST "general-ledger.txt\n";
|
||||||
open(GL_CSV_OUT, ">", "general-ledger.csv") or die "unable to write general-ledger.csv: $!";
|
open(GL_CSV_OUT, ">", "general-ledger.csv") or die "unable to write general-ledger.csv: $!";
|
||||||
print MANIFEST "general-ledger.csv\n";
|
print MANIFEST "general-ledger.csv\n";
|
||||||
|
|
||||||
|
my %manifest;
|
||||||
foreach my $acct (@sortedAccounts) {
|
foreach my $acct (@sortedAccounts) {
|
||||||
print GL_TEXT_OUT "\n\nACCOUNT: $acct\nFROM: $beginDate TO $formattedEndDate\n\n";
|
print GL_TEXT_OUT "\n\nACCOUNT: $acct\nFROM: $beginDate TO $formattedEndDate\n\n";
|
||||||
my @acctLedgerOpts = ('-V', '-F',
|
my @acctLedgerOpts = ('-V', '-F',
|
||||||
|
|
@ -131,7 +132,8 @@ foreach my $acct (@sortedAccounts) {
|
||||||
my $file = $1;
|
my $file = $1;
|
||||||
next if $file =~ /^\s*$/;
|
next if $file =~ /^\s*$/;
|
||||||
warn "$file does not exist and/or is not readable" unless -r $file;
|
warn "$file does not exist and/or is not readable" unless -r $file;
|
||||||
print MANIFEST "$file\n";
|
print MANIFEST "$file\n" if not defined $manifest{$file};
|
||||||
|
$manifest{$file} = $line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close(GL_CSV_DATA); die "error reading ledger output for chart of accounts: $!" unless $? == 0;
|
close(GL_CSV_DATA); die "error reading ledger output for chart of accounts: $!" unless $? == 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue