diff --git a/lib/Dancer2/FileUtils.pm b/lib/Dancer2/FileUtils.pm index 6a200f2d5..6232b9e2e 100644 --- a/lib/Dancer2/FileUtils.pm +++ b/lib/Dancer2/FileUtils.pm @@ -31,7 +31,7 @@ sub path_or_empty { return -e $path ? $path : ''; } -sub dirname { File::Basename::dirname(@_) } +sub dirname { return Path::Tiny::path(@_)->parent->stringify; } # Can be removed sub set_file_mode {