diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp
index 447467cb..2a65255f 100644
--- a/src/core/libraries/kernel/file_system.cpp
+++ b/src/core/libraries/kernel/file_system.cpp
@@ -656,7 +656,7 @@ static int GetDents(int fd, char* buf, int nbytes, s64* basep) {
     if (file == nullptr) {
         return ORBIS_KERNEL_ERROR_EBADF;
     }
-    if (file->type != Core::FileSys::FileType::Device) {
+    if (file->type == Core::FileSys::FileType::Device) {
         return file->device->getdents(buf, nbytes, basep);
     }