Skip to content

Commit 49769a1

Browse files
levtuxovlpil
authored andcommitted
fix: remove extra trailing slash in filepath.expand
1 parent 0ca3639 commit 49769a1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/filepath.gleam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ pub fn expand(path: String) -> Result(String, Nil) {
328328
|> split
329329
|> root_slash_to_empty
330330
|> expand_segments([])
331+
|> result.map(remove_trailing_slash)
331332

332333
case is_absolute && result == Ok("") {
333334
True -> Ok("/")

0 commit comments

Comments
 (0)