aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-27 05:46:26 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-27 05:46:26 +0200
commit45ba8188d181c4b9316366f89fc955956c26e502 (patch)
tree4aac2d154396a1f7e5ca97bbbc50e2d98f0cf79f /src
parent1dfbe97b0a639c91d7727acc443ee2a9c2057920 (diff)
Use current directory (.) for file directory if relative
Diffstat (limited to 'src')
-rw-r--r--src/std/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/std/file.c b/src/std/file.c
index bd0d8cc..d61e871 100644
--- a/src/std/file.c
+++ b/src/std/file.c
@@ -268,7 +268,7 @@ BufferView file_get_parent_directory(BufferView filepath) {
if(filepath.data[i] == '/')
return create_buffer_view(filepath.data, i);
}
- return create_buffer_view(filepath.data, 0);
+ return create_buffer_view(".", 1);
}
BufferView file_get_name(BufferView filepath) {