diff options
author | Bodo Möller <bodo@openssl.org> | 1999-06-08 12:17:55 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-06-08 12:17:55 +0200 |
commit | eabea024e839030fdfa406ddf4a88bd6fd9f89d1 (patch) | |
tree | ce97c530b5dfb7063d9c84fc40314d4f73877791 /util/mkdir-p.pl | |
parent | Complete support for PKCS#5 v2.0. Still needs extensive testing. (diff) | |
download | openssl-eabea024e839030fdfa406ddf4a88bd6fd9f89d1.tar.xz openssl-eabea024e839030fdfa406ddf4a88bd6fd9f89d1.zip |
Don't make assumptions on what the path looks like.
Diffstat (limited to 'util/mkdir-p.pl')
-rwxr-xr-x | util/mkdir-p.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/mkdir-p.pl b/util/mkdir-p.pl index 2c003d6e84..6c69c2daa4 100755 --- a/util/mkdir-p.pl +++ b/util/mkdir-p.pl @@ -15,19 +15,19 @@ foreach $arg (@ARGV) { sub do_mkdir_p { local($dir) = @_; - $dir =~ s|/*$||; + $dir =~ s|/*\Z(?!\n)||s; if (-d $dir) { return; } - if ($dir =~ /\//) { + if ($dir =~ m|[^/]/|s) { local($parent) = $dir; - $parent =~ s|[^/]*$||; + $parent =~ s|[^/]*\Z(?!\n)||s; do_mkdir_p($parent); } mkdir($dir, 0777) || die "Cannot create directory $dir: $!\n"; - print "created directory $dir\n"; + print "created directory `$dir'\n"; } |