diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-19 11:00:18 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-19 11:00:27 +0200 |
commit | 6bf27664f8580430751f46c9d0bef474a0835fab (patch) | |
tree | 132f4b58bdc551fc4cf46c907582d102fd5e96d5 | |
parent | a5567dcff02be9b9b5622a6fee51f6cbb0f76727 (diff) | |
download | dwim-6bf27664f8580430751f46c9d0bef474a0835fab.tar.gz |
Fix dirname()
This bug had the side-effect of the chdir in path() failing.
-rwxr-xr-x | dwim | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -182,6 +182,6 @@ sub run { # dirname -- return path without last part sub dirname { my $path = shift; - $path =~ s,/[^/]+,,; + $path =~ s,/[^/]+$,,; return $path; } |