From 50bc9f42d5658818347b50f452445f5bcdb7c75d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Mar 2025 15:20:53 -0400 Subject: Fix some relative path stuff --- src/stdlib/paths.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/stdlib/paths.c') diff --git a/src/stdlib/paths.c b/src/stdlib/paths.c index 7f881c00..c7b560b9 100644 --- a/src/stdlib/paths.c +++ b/src/stdlib/paths.c @@ -710,6 +710,13 @@ public Array_t Path$glob(Path_t path) return glob_files; } +public Path_t Path$current_dir(void) +{ + char cwd[PATH_MAX]; + getcwd(cwd, sizeof(cwd)); + return Path$from_str(cwd); +} + public PUREFUNC uint64_t Path$hash(const void *obj, const TypeInfo_t *type) { (void)type; -- cgit v1.2.3