aboutsummaryrefslogtreecommitdiff
path: root/src/path.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-10 15:09:13 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2024-07-10 15:09:13 +0200
commitcc73e06a46cbefd2afa4caa7ef95ba6d9ab64eb9 (patch)
treeab8582b26760c023d37d525f355046aacf93944f /src/path.cpp
parent8dc4eca4d2940500de30dfb8fd2ec25f7c31eba7 (diff)
Allow precompiled resources with -resource:foo.res
And add them to the magic new feature.
Diffstat (limited to 'src/path.cpp')
-rw-r--r--src/path.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/path.cpp b/src/path.cpp
index 26ccb7cbf..2c08ddd98 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -152,6 +152,13 @@ gb_internal String path_to_string(gbAllocator a, Path path) {
return res;
}
+gb_internal String quote_path(gbAllocator a, Path path) {
+ String temp = path_to_string(a, path);
+ String quoted = concatenate3_strings(a, str_lit("\""), temp, str_lit("\""));
+ gb_free(a, temp.text);
+ return quoted;
+}
+
// NOTE(Jeroen): Naively turns a Path into a string, then normalizes it using `path_to_full_path`.
gb_internal String path_to_full_path(gbAllocator a, Path path) {
String temp = path_to_string(heap_allocator(), path);