Browse Source

Kernel: fix assertion on readlink() syscall

The is_error() check on the KResultOr returned when reading the link
target had a stray ! operator which causes link resolution to crash the
kernel with an assertion error.
Angel 5 years ago
parent
commit
6137475c39
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Kernel/Process.cpp

+ 1 - 1
Kernel/Process.cpp

@@ -1944,7 +1944,7 @@ int Process::sys$readlink(const Syscall::SC_readlink_params* user_params)
         return -EINVAL;
 
     auto contents = description->read_entire_file();
-    if (!contents.is_error())
+    if (contents.is_error())
         return contents.error();
 
     auto link_target = String::copy(contents.value());