summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/System.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCore/System.cpp')
-rw-r--r--Userland/Libraries/LibCore/System.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp
index 37e1099b66..c1a66dac17 100644
--- a/Userland/Libraries/LibCore/System.cpp
+++ b/Userland/Libraries/LibCore/System.cpp
@@ -107,7 +107,7 @@ ErrorOr<int> open(StringView path, int options, ...)
HANDLE_SYSCALL_RETURN_VALUE("open"sv, rc, rc);
#else
// NOTE: We have to ensure that the path is null-terminated.
- String path_string;
+ String path_string = path;
int rc = ::open(path_string.characters(), options, mode);
if (rc < 0)
return Error::from_syscall("open"sv, -errno);