From 6bf27664f8580430751f46c9d0bef474a0835fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 19 Jun 2021 11:00:18 +0200 Subject: Fix dirname() This bug had the side-effect of the chdir in path() failing. --- dwim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3