From 4d70928a72fa272fefeceb98e9506e6dac1a91fd Mon Sep 17 00:00:00 2001
From: Jens Steidl <Jens.Steidl@slub-dresden.de>
Date: Tue, 23 Jul 2019 12:27:31 +0200
Subject: [PATCH] - bugfix: SIP directory name for --noppn

---
 bin/slubsipbuilder.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/slubsipbuilder.pl b/bin/slubsipbuilder.pl
index 86f492a..786af1a 100755
--- a/bin/slubsipbuilder.pl
+++ b/bin/slubsipbuilder.pl
@@ -286,7 +286,7 @@ sub main {
         mkpath("$output") || confess("could not create SIP directory for '$output', $!");
     }
     $output = abs_path($output);
-    my $sip_root_dir = "PPN-${ppn}_${file_date}";
+    my $sip_root_dir = (defined $ppn)? "PPN-${ppn}_${file_date}" : "ID-${noppn}_${file_date}";
     my $content = "$output/$sip_root_dir/data";
     if (!defined $as_zip) {
         mkpath("$output/$sip_root_dir") || confess("could not create SIP directory for '$output/$sip_root_dir', $!");
-- 
GitLab