diff --git a/t/slubsipbuilder.t b/t/slubsipbuilder.t index ced09ce006cbae2d61af23b3f0fba1c415121a11..6c5549955e452742908edab08a4c52cc8e691482 100755 --- a/t/slubsipbuilder.t +++ b/t/slubsipbuilder.t @@ -549,23 +549,18 @@ my $valid_ie_dir_path = $export_dir_kitodo_path->absolute . "/" . $valid_ie_dir; my $not_valid_ie_dir_path = $export_dir_kitodo_path->absolute . "/" . $not_valid_ie_dir; my $file = "test.txt"; my $file2 = "test+.txt"; -if(! -d $export_dir_kitodo_path) { - mkdir $export_dir_kitodo_path or die "Error creating directory: $export_dir_kitodo_path"; - if(! -d $export_dir_kitodo_path->child($valid_ie_dir)) { - mkdir $export_dir_kitodo_path->child($valid_ie_dir) or die "Error creating directory: $export_dir_kitodo_path->child($valid_ie_dir)"; - if(! -f $export_dir_kitodo_path->child($valid_ie_dir)->child($file)) { - open FILE, '>'.$export_dir_kitodo_path->child($valid_ie_dir)->child($file) or die "Unable to create $file"; - close FILE; - } - } - if(! -d $export_dir_kitodo_path->child($not_valid_ie_dir)) { - mkdir $export_dir_kitodo_path->child($not_valid_ie_dir) or die "Error creating directory: $export_dir_kitodo_path->child($not_valid_ie_dir)"; - if(! -f $export_dir_kitodo_path->child($not_valid_ie_dir)->child($file2)) { - open FILE, '>'.$export_dir_kitodo_path->child($not_valid_ie_dir)->child($file2) or die "Unable to create $file"; - close FILE; - } - } +if(! -d $export_dir_kitodo_path) { mkdir $export_dir_kitodo_path or die "Error creating directory: $export_dir_kitodo_path"; } +if(! -d $export_dir_kitodo_path->child($valid_ie_dir)) { mkdir $export_dir_kitodo_path->child($valid_ie_dir) or die "Error creating directory: $export_dir_kitodo_path->child($valid_ie_dir)"; } +if(! -f $export_dir_kitodo_path->child($valid_ie_dir)->child($file)) { + open FILE, '>'.$export_dir_kitodo_path->child($valid_ie_dir)->child($file) or die "Unable to create $file"; + close FILE; +} +if(! -d $export_dir_kitodo_path->child($not_valid_ie_dir)) { mkdir $export_dir_kitodo_path->child($not_valid_ie_dir) or die "Error creating directory: $export_dir_kitodo_path->child($not_valid_ie_dir)"; } +if(! -f $export_dir_kitodo_path->child($not_valid_ie_dir)->child($file2)) { + open FILE, '>'.$export_dir_kitodo_path->child($not_valid_ie_dir)->child($file2) or die "Unable to create $file"; + close FILE; } + my $mysip_path = path(__FILE__)->parent->parent->child('tmp')->child('mysip'); if(! -d $mysip_path->parent) { mkdir $mysip_path->parent or die "Error creating directory: tmp";} if(! -d $mysip_path) { mkdir $mysip_path or die "Error creating directory: $mysip_path";}