aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdwim2
1 files changed, 1 insertions, 1 deletions
diff --git a/dwim b/dwim
index cde91fc..33953c0 100755
--- a/dwim
+++ b/dwim
@@ -182,6 +182,6 @@ sub run {
# dirname -- return path without last part
sub dirname {
my $path = shift;
- $path =~ s,/[^/]+,,;
+ $path =~ s,/[^/]+$,,;
return $path;
}