diff --git a/fhem/contrib/zwave_configconvert.pl b/fhem/contrib/zwave_configconvert.pl index 110720a31..fa7b12d3d 100644 --- a/fhem/contrib/zwave_configconvert.pl +++ b/fhem/contrib/zwave_configconvert.pl @@ -20,6 +20,9 @@ if($ARGV[0] eq "-d") { my $f = $1; next if(-f "config/$f"); print("Creating: config/$f\n"); + my $dir = $f; + $dir =~ s,/[^/]*$,,; + `mkdir -p config/$dir`; open(FH, ">config/$f") || die("open config/$f: $!\n"); print FH $l; while($l = ) { @@ -33,7 +36,7 @@ if($ARGV[0] eq "-d") { print '', "\n"; print "\n"; -foreach my $file (`find $ARGV[0] -name \*.xml`) { +foreach my $file (`find $ARGV[0] -name \\*.xml`) { chomp($file); my $name = $file; $name =~ s+.*config/++;