Merge pull request 'Skip padding when id is empty string' (#114) from I110_Error-Argument-isnt-numeric into main

Reviewed-on: rho_n/hpr_generator#114
This commit is contained in:
Roan Horning 2023-06-05 02:52:37 +00:00
commit 10236d5705

View File

@ -303,7 +303,7 @@ sub get_filename {
else {
$filename = $$config{'filename'};
my $padded_index = "";
if (exists $$config{'id'}) {
if (exists $$config{'id'} && $$config{'id'} ne "") {
$padded_index = sprintf("%04d", $$config{'id'});
}
$filename =~ s/\[id\]/$padded_index/;