aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/paths.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-16 17:21:01 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-16 17:21:01 -0400
commitc72b0406a32ffc3f04324f7b6c321486762fca41 (patch)
tree244e51c858890ea2ffb8c74a2c33c81b79de376e /src/stdlib/paths.c
parent849fd423a759edf1b58b548a6148c177a6f8cd71 (diff)
Improved parsing and prefix/suffix matching using a `remainder`
parameter
Diffstat (limited to 'src/stdlib/paths.c')
-rw-r--r--src/stdlib/paths.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c
index 94baf995..58702ec7 100644
--- a/src/stdlib/paths.c
+++ b/src/stdlib/paths.c
@@ -619,10 +619,10 @@ public bool Path$has_extension(Path_t path, Text_t extension)
if (extension.length == 0)
return !Text$has(Text$from(last, I(2)), Text(".")) || Text$equal_values(last, Text(".."));
- if (!Text$starts_with(extension, Text(".")))
+ if (!Text$starts_with(extension, Text("."), NULL))
extension = Texts(Text("."), extension);
- return Text$ends_with(Text$from(last, I(2)), extension);
+ return Text$ends_with(Text$from(last, I(2)), extension, NULL);
}
public Path_t Path$child(Path_t path, Text_t name)