From f5111292c2486e22b542c3991e11c036cb24bb1d Mon Sep 17 00:00:00 2001 From: levtuxov Date: Sat, 29 Mar 2025 18:35:57 +0200 Subject: [PATCH] fix: remove extra trailing slash in filepath.expand --- src/filepath.gleam | 1 + 1 file changed, 1 insertion(+) diff --git a/src/filepath.gleam b/src/filepath.gleam index 4497211..6220708 100644 --- a/src/filepath.gleam +++ b/src/filepath.gleam @@ -328,6 +328,7 @@ pub fn expand(path: String) -> Result(String, Nil) { |> split |> root_slash_to_empty |> expand_segments([]) + |> result.map(remove_trailing_slash) case is_absolute && result == Ok("") { True -> Ok("/")