aboutsummaryrefslogtreecommitdiff
path: root/src/path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/path.cpp')
-rw-r--r--src/path.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/path.cpp b/src/path.cpp
index 3b359a269..49a2d4a4f 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -2,6 +2,9 @@
Path handling utilities.
*/
gb_internal String remove_extension_from_path(String const &s) {
+ if (s.len != 0 && s.text[s.len-1] == '.') {
+ return s;
+ }
for (isize i = s.len-1; i >= 0; i--) {
if (s[i] == '.') {
return substring(s, 0, i);