diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-03-19 20:22:08 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-03-19 20:22:08 +0100 |
commit | b62be25f0bbf8617fb4d288df9bc462985a2d6cd (patch) | |
tree | 3ba2e96789b38f89b22b3f7ed0946248898b1406 /bin | |
parent | dcebfc77de8884440e7812b9468cfaa493541d77 (diff) |
checklinks: Make directory autocreation actually work
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/checklinks | 8 |
1 files 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; } |