From 91f06612f062059bda5fdbe340914957d1130e9b Mon Sep 17 00:00:00 2001 From: StunxFS Date: Tue, 14 Nov 2023 21:37:29 -0400 Subject: [PATCH] minor change --- lib/std/src/fs/Path.ri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/src/fs/Path.ri b/lib/std/src/fs/Path.ri index 129c06b26..89329784d 100644 --- a/lib/std/src/fs/Path.ri +++ b/lib/std/src/fs/Path.ri @@ -143,7 +143,7 @@ public struct Path { /// Files that end with `.`, or that start with `.` and have no other `.` in their /// name, are considered to have no extension. public func extension(path: string) -> string { - filename := Self.base_name(path); + filename := Self.file_name(path); index := filename.last_index_of_byte(b'.') ?? return ""; return if index == 0 or index + 1 >= filename.len { ""