Skip to content

Commit

Permalink
Remove blank files from list in ctsm.input_data_list fixing ESCOMP#1476
Browse files Browse the repository at this point in the history
  • Loading branch information
ekluzek committed Nov 9, 2021
1 parent c321c20 commit 017a7ed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4365,8 +4365,9 @@ sub check_input_files {

if ($input_pathname_type eq 'abs') {
if ($inputdata_rootdir) {
#MV $pathname =~ s:$inputdata_rootdir::;
print OUTFILE "$var = $pathname\n";
if ( $pathname !~ /^\s*$/ ) { # If pathname isn't blank or null
print OUTFILE "$var = $pathname\n";
}
}
else {
if (-e $pathname) { # use -e rather than -f since the absolute pathname
Expand All @@ -4387,7 +4388,9 @@ sub check_input_files {
if ($inputdata_rootdir) {
$pathname = "$rootdir/$pathname";
#MV $pathname =~ s:$inputdata_rootdir::;
print OUTFILE "$var = $pathname\n";
if ( $pathname !~ /^\s*$/ ) { # If pathname isn't blank or null
print OUTFILE "$var = $pathname\n";
}
}
else {
if (-f "$rootdir/$pathname") {
Expand Down

0 comments on commit 017a7ed

Please sign in to comment.