summaryrefslogtreecommitdiff
path: root/linker/linker_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linker/linker_utils.cpp')
-rw-r--r--linker/linker_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/linker/linker_utils.cpp b/linker/linker_utils.cpp
index 789d5c1b8..6b9aec9fa 100644
--- a/linker/linker_utils.cpp
+++ b/linker/linker_utils.cpp
@@ -98,8 +98,8 @@ bool normalize_path(const char* path, std::string* normalized_path) {
while (out_ptr > buf && *--out_ptr != '/') {
}
if (in_ptr[0] == 0) {
- // retain '/'
- out_ptr++;
+ // retain '/' (or write the initial '/' for "/..")
+ *out_ptr++ = '/';
}
continue;
}