From b62be25f0bbf8617fb4d288df9bc462985a2d6cd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 19 Mar 2011 20:22:08 +0100 Subject: checklinks: Make directory autocreation actually work --- bin/checklinks | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/checklinks b/bin/checklinks index 0a522b1..3150293 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -25,11 +25,11 @@ sub mkdirs { # the last element is the file pop(@dirs); - foreach (@dirs) { - if (not -d "$path/$_") { - mkdir("$path/$_") or die("Can't create $path/$_: $!"); + for my $dir (@dirs) { + if (not -d "$path/$dir") { + mkdir("$path/$dir") or die("Can't create $path/$dir: $!"); } - $path .= $_; + $path .= "/$dir"; } return; } -- cgit v1.2.3